From: Derrick Brashear Date: Thu, 13 Jul 2006 19:20:32 +0000 (+0000) Subject: STABLE14-vpurge-needs-no-lock-20060713 X-Git-Tag: openafs-stable-1_4_2b3~43 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=af4757a1ece61c4eda39721009d6221cc3e1360c;p=packages%2Fo%2Fopenafs.git STABLE14-vpurge-needs-no-lock-20060713 don't hold the VOL_LOCK during vpurgevolume volserver's transaction stuff (NewTrans, actually) precludes any problem (cherry picked from commit 6878e0b6348a649768274adbce77500fbd45caa4) --- diff --git a/src/vol/purge.c b/src/vol/purge.c index 01bb22efa..b9057f71c 100644 --- a/src/vol/purge.c +++ b/src/vol/purge.c @@ -58,8 +58,11 @@ RCSID void PurgeIndex_r(Volume * vp, VnodeClass class); void PurgeHeader_r(Volume * vp); +/* No lock needed. Only the volserver will call this, and only one transaction + * can have a given volume (volid/partition pair) in use at a time + */ void -VPurgeVolume_r(Error * ec, Volume * vp) +VPurgeVolume(Error * ec, Volume * vp) { struct DiskPartition *tpartp = vp->partition; char purgePath[MAXPATHLEN]; @@ -81,14 +84,6 @@ VPurgeVolume_r(Error * ec, Volume * vp) FSYNC_askfs(V_id(vp), tpartp->name, FSYNC_RESTOREVOLUME, 0); } -void -VPurgeVolume(Error * ec, Volume * vp) -{ - VOL_LOCK; - VPurgeVolume_r(ec, vp); - VOL_UNLOCK; -} - #define MAXOBLITATONCE 200 /* delete a portion of an index, adjusting offset appropriately. Returns 0 if things work and we should be called again, 1 if success full and done, and -1