From: Nickolai Zeldovich Date: Sat, 2 Dec 2000 17:46:52 +0000 (+0000) Subject: bulkstat-changes-20001202 X-Git-Tag: BP-openafs-stable-1_0_x~3 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=8f0ac00554f7b78dd5b71d576a41a2967081910e;p=packages%2Fo%2Fopenafs.git bulkstat-changes-20001202 change in bulkstatus code --- diff --git a/src/afs/VNOPS/afs_vnop_lookup.c b/src/afs/VNOPS/afs_vnop_lookup.c index 1778c4050..c02fcfb03 100644 --- a/src/afs/VNOPS/afs_vnop_lookup.c +++ b/src/afs/VNOPS/afs_vnop_lookup.c @@ -637,6 +637,7 @@ tagain: /* actually a serious error, probably should panic. Probably will * panic soon, oh well. */ ReleaseReadLock(&afs_xvcache); + afs_warnuser("afs_DoBulkStat: VLRU empty!"); goto done; } if ((VLRU.next->prev != &VLRU) || (VLRU.prev->next != &VLRU)) { @@ -739,12 +740,15 @@ tagain: refpanic ("Bulkstat VLRU inconsistent6"); ReleaseWriteLock(&afs_xvcache); + ObtainWriteLock(&afs_xcbhash, 494); + /* We need to check the flags again. We may have missed * something while we were waiting for a lock. */ if (!(tvcp->states & CBulkFetching) || (tvcp->m.Length != statSeqNo)) { flagIndex++; ReleaseWriteLock(&tvcp->lock); + ReleaseWriteLock(&afs_xcbhash); afs_PutVCache(tvcp); continue; } @@ -761,19 +765,6 @@ tagain: tvcp->v.v_op = &afs_symlink_iops; #endif - ObtainWriteLock(&afs_xcbhash, 494); - - /* We need to check the flags once more. We may have missed - * something while we were waiting for a lock. - */ - if (!(tvcp->states & CBulkFetching) || (tvcp->m.Length != statSeqNo)) { - flagIndex++; - ReleaseWriteLock(&afs_xcbhash); - ReleaseWriteLock(&tvcp->lock); - afs_PutVCache(tvcp); - continue; - } - /* do some accounting for bulk stats: mark this entry as * loaded, so we can tell if we use it before it gets * recycled.