[OpenAFS-devel] VLDB flags inconsistencies?

Nathaniel W Filardo nwf@cs.jhu.edu
Wed, 30 Jul 2014 19:38:19 -0400


--JyUo+2rKuw1VKSUr
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Hey all,

As part of the cleanup in http://gerrit.openafs.org/#change,11331 I stumbled
upon a few things that probably should go here for review (thanks to Ben for
suggesting).

src/volser/vos.c:2155 says "if (entry.serverFlags[j] != ITSROVOL)", but that
field is a bitmask, so I think that that should be "if
(!(entry.serverFlags[j] & ITSROVOL))" (but also renamed to VLSF_ROVOL,
naturally) so that DeleteVolume will not skip RO volumes with other VLSF
bits asserted (e.g., VLSF_DONTUSE or VLSF_NEWREPSITE).  Does that seem
right?

src/volser/vsprocs.c:6217 says "entry.serverFlags[idx] = ITSBACKVOL;".
ITSBACKVOL and VLSF_BACKVOL are almost never otherwise used in the codebase,
and in particular the rest of the codebase seems to assume that the backup
volume has VLSF_RWVOL asserted, not VLSF_BACKVOL.  I believe that
CheckVolume is here trying to recreate a backup volume record that will get
detected as such, and so should read "entry.serverFlags[idx] = VLSF_RWVOL;".
Does that, too, seem right?

If these behavioral changes seem right, I'll move them out to their own
commits, rather than leaving them in 11331.

Thanks much.
--nwf;

--JyUo+2rKuw1VKSUr
Content-Type: application/pgp-signature

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

iEYEARECAAYFAlPZgesACgkQTeQabvr9Tc82bACfaKga7w3F5knHhBQiqOgzXRqj
WbEAn2d/NgXBux9kLFGmkP6FOVjpwf3Q
=y+1N
-----END PGP SIGNATURE-----

--JyUo+2rKuw1VKSUr--