From 1b1c0eda5a3db6fe92d46d5f3d8529bf7c6378c2 Mon Sep 17 00:00:00 2001 From: Chaskiel M Grundman Date: Mon, 14 May 2007 22:36:22 +0000 Subject: [PATCH] getdcache-no-slowpass-enforcement-on-dynroot-20070514 don't enforce slowpass restriction on dynroot vcaches (and don't do unneeded work) ==================== This delta was composed from multiple commits as part of the CVS->Git migration. The checkin message with each commit was inconsistent. The following are the additional commit messages. ==================== oops, another change slipped in --- src/afs/afs_dcache.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/src/afs/afs_dcache.c b/src/afs/afs_dcache.c index fa3c63d27..d316848c4 100644 --- a/src/afs/afs_dcache.c +++ b/src/afs/afs_dcache.c @@ -2559,17 +2559,19 @@ afs_GetDCache(register struct vcache *avc, afs_size_t abyte, afs_DCMoveBucket(tdc, 0, 0); ReleaseWriteLock(&tdc->lock); afs_PutDCache(tdc); - ObtainWriteLock(&afs_xcbhash, 454); - afs_DequeueCallback(avc); - avc->states &= ~(CStatd | CUnique); - ReleaseWriteLock(&afs_xcbhash); - if (avc->fid.Fid.Vnode & 1 || (vType(avc) == VDIR)) - osi_dnlc_purgedp(avc); - /* - * Locks held: - * avc->lock(W); assert(!setLocks || slowPass) - */ - osi_Assert(!setLocks || slowPass); + if (!afs_IsDynroot(avc)) { + ObtainWriteLock(&afs_xcbhash, 454); + afs_DequeueCallback(avc); + avc->states &= ~(CStatd | CUnique); + ReleaseWriteLock(&afs_xcbhash); + if (avc->fid.Fid.Vnode & 1 || (vType(avc) == VDIR)) + osi_dnlc_purgedp(avc); + /* + * Locks held: + * avc->lock(W); assert(!setLocks || slowPass) + */ + osi_Assert(!setLocks || slowPass); + } tdc->f.states &= ~(DRO|DBackup|DRW); afs_DCMoveBucket(tdc, 0, 0); tdc = NULL; -- 2.39.5