afs: add afsd -inumcalc option 55/11855/11
authorMichael Meffie <mmeffie@sinenomine.net>
Wed, 29 Apr 2015 16:00:24 +0000 (12:00 -0400)
committerBenjamin Kaduk <kaduk@mit.edu>
Sun, 11 Sep 2016 20:58:35 +0000 (16:58 -0400)
commit0028ea92ad3e7aac6a4c51f63703a4d9d7b9dcd6
tree0ce6e6b79d473d8f25785205e327532e452092b1
parentc17d14223044936a5de5007052eff3488350e9d4
afs: add afsd -inumcalc option

This commit adds the afsd -inumcalc command line switch to specify the
inode number calculation method in a platform neutral way.

Inode numbers reported for files within the AFS filesystem are generated
by the cache manager using a calculation which derives a number from a
FID. Long ago, a new type of calculation was added which generates inode
numbers using a MD5 message digest of the FID.  The MD5 inode number
calculation variant is computationally more expensive but greatly
reduces the chances for inode number collisions.

The MD5 calculation can be enabled on the Linux cache manager using the
Linux sysctl interface.  Other than the sysctl method of selecting the
inode calculation type, the MD5 inode number calculation method is not
specific to Linux.

This change introduces a command-line option which accepts a value to
indicate the calculation method, instead of a simple flag to enable MD5
inode numbers.  This should allow for new inode calculation methods
in the future without the need for additional afsd command-line flags.

Two values are currently accepted for -inumcalc. The value of 'compat'
specifies the legacy inode number calculation. The value 'md5' indicates
that the new MD5 calculation is to be used.

Change-Id: I0257c68ca1a32a7a4c55ca8174a4926ff78ddea4
Reviewed-on: https://gerrit.openafs.org/11855
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
doc/man-pages/pod8/afsd.pod
src/afs/LINUX/osi_sysctl.c
src/afs/afs_call.c
src/afs/afs_util.c
src/afsd/afsd.c
src/config/afs_args.h