From aa5d46b71b3700d6256f47237fadf0a4829daee6 Mon Sep 17 00:00:00 2001 From: Derrick Brashear Date: Fri, 18 May 2007 06:52:37 +0000 Subject: [PATCH] clone-dont-hold-vol-lock-20070516 same deal as purge. a transaction on the volume outstanding holds it. we don't need to preclude all access ==================== 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. ==================== same deal as purge. a transaction on the volume outstanding holds it. we don't n eed to preclude all access ==================== same deal as purge. a transaction on the volume outstanding holds it. we don't n eed to preclude all access --- src/vol/clone.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/src/vol/clone.c b/src/vol/clone.c index 1672515aa..263462437 100644 --- a/src/vol/clone.c +++ b/src/vol/clone.c @@ -256,7 +256,7 @@ DoCloneIndex(Volume * rwvp, Volume * clvp, VnodeClass class, int reclone) Log("IH_INC failed: %x, %s, %u errno %d\n", V_linkHandle(rwvp), PrintInode(NULL, rwinode), V_parentId(rwvp), errno); - VForceOffline_r(rwvp, 0); + VForceOffline(rwvp); ERROR_EXIT(EIO); } inodeinced = 1; @@ -309,7 +309,7 @@ DoCloneIndex(Volume * rwvp, Volume * clvp, VnodeClass class, int reclone) Log("IH_DEC failed: %x, %s, %u errno %d\n", V_linkHandle(rwvp), PrintInode(NULL, rwinode), V_parentId(rwvp), errno); - VForceOffline_r(rwvp, 0); + VForceOffline(rwvp); ERROR_EXIT(EIO); } } @@ -403,15 +403,7 @@ DoCloneIndex(Volume * rwvp, Volume * clvp, VnodeClass class, int reclone) } void -CloneVolume(Error * error, Volume * original, Volume * new, Volume * old) -{ - VOL_LOCK; - CloneVolume_r(error, original, new, old); - VOL_UNLOCK; -} - -void -CloneVolume_r(Error * rerror, Volume * original, Volume * new, Volume * old) +CloneVolume(Error * rerror, Volume * original, Volume * new, Volume * old) { afs_int32 code, error = 0; afs_int32 reclone; @@ -426,7 +418,7 @@ CloneVolume_r(Error * rerror, Volume * original, Volume * new, Volume * old) if (code) ERROR_EXIT(code); - code = CopyVolumeHeader_r(&V_disk(original), &V_disk(new)); + code = CopyVolumeHeader(&V_disk(original), &V_disk(new)); if (code) ERROR_EXIT(code); -- 2.39.5