[OpenAFS] Longer volume names than 22 characters.

Derrick Brashear shadow@gmail.com
Tue, 24 Feb 2009 09:43:06 -0500


On Tue, Feb 24, 2009 at 4:58 AM, Anders Magnusson <ragge@ltu.se> wrote:
> I took a quick look in the source code, and found that there are two
> interesting defines (in volser.h):
>
> #define VOLSER_MAXVOLNAME 65
> #define VOLSER_OLDMAXVOLNAME 32
>
> So, obviously someone has thought about allowing longer names, but the
> checks seems to be against
> the old name length so it don't work.
> What is needed if we want to use longer names? =A0And may it cause
> incompatibility with clients
> or other cells or whatever?

All vlserver calls already use 65:
const   VL_MAXNAMELEN   =3D       65;

Sadly, look what's on the on-disk volume header:
typedef struct VolumeDiskData {
    struct versionStamp stamp;  /* Must be first field */
    VolumeId id;                /* Volume id--unique over all systems */
#define VNAMESIZE 32            /* including 0 byte */
    char name[VNAMESIZE];       /* Unofficial name for the volume */

So basically, you'd have to upgrade that, including having an upgrade
and downgrade path for volume headers (and then switch out vos
anywhere you wanted to actually be able to manipulate the volumes)

It's not actually all that hard, realistically.