[OpenAFS-devel] VLDB flag bits

Nathaniel W Filardo nwf@cs.jhu.edu
Fri, 25 Jul 2014 04:38:44 -0400


--RYJh/3oyKhIjGcML
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Salutations -devel@,

I have three related sets of questions for you.

First, conflicting serverFlags bits:

Which of afs/vldbint.h or afs/volser.h do I believe?  They agree on "new
repsite", "rw", "ro", and "backup" volumes, but then one says "rwrepl",
"dontuse" while the other says "uuid", "dontuse", "rwrepl":

afs/volser.h
> #define NEW_REPSITE 0x01
> #define ITSROVOL    0x02
> #define ITSRWVOL    0x04
> #define ITSBACKVOL  0x08
> #define ITSRWREPL   0x10
> #define RO_DONTUSE  0x20

afs/vldbint.h
> #define VLSF_NEWREPSITE 0x01 /* flags for indiv. server entry */
> #define VLSF_ROVOL 0x02
> #define VLSF_RWVOL 0x04
> #define VLSF_BACKVOL 0x08
> #define VLSF_UUID 0x10
> #define VLSF_DONTUSE 0x20
> #define VLSF_RWREPLICA 0x40 /* Volume is a RW replica */

It looks like ITSRWREPL is a lie and that it isn't used in the codebase
while VLSF_UUID is.  Should the two sets of definitions be harmonized or
replaced with just a single one somewhere?  Despite appearances, are these
actually referring to two different serialized forms?  (The comment in
afs/volser.h says that these refer to nvldbEntry, which is defined in
afs/vldbint.h)

Second, VLOP flags:

While here, why are VLOP flags defined in vldbint.h with self-styled bogus
clashing names in volser.h?

And third, please send help, I am so confused:

I believe the following assertions, could someone please tell me their
validity?

  1) A clone volume is identified by the cloneId field, which may only be
     set if the RO_EXISTS bit is on.  There's not really a separate entry
     for the clone volume; the semantics are inherited from the one with
     VLSF_ROVOL turned on.

  2) VLSF_BACKVOL is not used in practice; the VLDB marks backup volumes
     with VLSF_RWVOL.

Thanks much,
--nwf;

--RYJh/3oyKhIjGcML
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iEYEARECAAYFAlPSF5QACgkQTeQabvr9Tc+5rQCePQ39E3uQMCU/T+mYASMFDne+
j54An3ZZQrwahkj9oLMqrlpdPg/j2eeL
=Jd0j
-----END PGP SIGNATURE-----

--RYJh/3oyKhIjGcML--