From cff2a5b1affbef7141fe9c4e093483dcd0da3512 Mon Sep 17 00:00:00 2001 From: Andrew Deason Date: Mon, 20 Jun 2022 13:07:44 -0500 Subject: [PATCH] afs: Update VCHash comments on not hashing on uniq The comments above VCHash claim that PFlush relies on the fid uniq not being used in VCHash, but this doesn't appear to be true. However, we do have some code that relies on VCHash not using uniq: afs_GenFakeFid. Update the VCHash comment to point this out. Change-Id: Ib1e0c1700c4cd13b95ac57522645ce73d2b24a08 Reviewed-on: https://gerrit.openafs.org/15042 Reviewed-by: Michael Meffie Tested-by: BuildBot Reviewed-by: Cheyenne Wills Reviewed-by: Andrew Deason --- src/afs/afs_vcache.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/afs/afs_vcache.c b/src/afs/afs_vcache.c index 95b74659fd..3b065f8386 100644 --- a/src/afs/afs_vcache.c +++ b/src/afs/afs_vcache.c @@ -88,12 +88,12 @@ static afs_int32 afs_QueueVCB(struct vcache *avc, int *slept); /* - * The PFlush algorithm makes use of the fact that Fid.Unique is not used in - * below hash algorithms. Change it if need be so that flushing algorithm - * doesn't move things from one hash chain to another. + * Don't hash on the cell; our callback-breaking code sometimes fails to compute + * the cell correctly, and only scans one hash bucket. + * + * Don't hash on the uniq; afs_GenFakeFid looks through a single hash bucket to + * find the max possible uniq for a given fid. */ -/* Don't hash on the cell; our callback-breaking code sometimes fails to compute - * the cell correctly, and only scans one hash bucket. */ int VCHash(struct VenusFid *fid) { return opr_jhash_int2(fid->Fid.Volume, fid->Fid.Vnode, 0) &