From: Mark Vitale Date: Fri, 25 May 2018 21:05:28 +0000 (-0400) Subject: afs: fix broken volume callbacks (e.g. vos release) X-Git-Tag: openafs-devel-1_9_0~548 X-Git-Url: https://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=1dc9bb4e7362029db073250f23a09f949e1655de afs: fix broken volume callbacks (e.g. vos release) Commit e99bfcfaa3bca3e65f03928718c2c9eb5eff7c8c ('afs: use jenkins hash for dcache, vcache tables') introduced new hashing implementations for the dcache and vcache hash tables. Unfortunately, a typo introduced a bug into the VCHashV hash function; instead of hashing by volume id, it currently hashes by vnode. The most common symptom is that volume callbacks (RXAFSCB_Callback with fid :0:0) fail to find and invalidate all the files for the specified volume. This typically manifests as persistent stale RO content after a 'vos release' for new RW content. This bug only affects the Unix cache manager; the Windows cache manager implementation of RXAFSCB_Callback was unaffected. Change-Id: I7edca660671b880a69f0c499d54adffbbe62d2b2 Reviewed-on: https://gerrit.openafs.org/13090 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk --- diff --git a/src/afs/afs_vcache.c b/src/afs/afs_vcache.c index 5b98a73..c34f2e1 100644 --- a/src/afs/afs_vcache.c +++ b/src/afs/afs_vcache.c @@ -101,7 +101,7 @@ int VCHash(struct VenusFid *fid) /* Hash only on volume to speed up volume callbacks. */ int VCHashV(struct VenusFid *fid) { - return opr_jhash_int(fid->Fid.Vnode, 0) & opr_jhash_mask(VCSIZEBITS); + return opr_jhash_int(fid->Fid.Volume, 0) & opr_jhash_mask(VCSIZEBITS); } /*!