From cbb930673a4f5a51ee5d4efd06b3ca2442d6ec01 Mon Sep 17 00:00:00 2001 From: Simon Wilkinson Date: Wed, 28 Jan 2009 21:02:28 +0000 Subject: [PATCH] DEVEL15-disconnected-reply-no-locking-yet-20090128 LICENSE IPL10 FIXES 124202 don't lock files before replaying changes yet (cherry picked from commit cc2f0d2bc52e980c376188888faa27cd37b0eccc) --- src/afs/afs_disconnected.c | 7 ++++--- src/afs/afs_pioctl.c | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/afs/afs_disconnected.c b/src/afs/afs_disconnected.c index 46554e4e5..b4feef7a0 100644 --- a/src/afs/afs_disconnected.c +++ b/src/afs/afs_disconnected.c @@ -1138,7 +1138,7 @@ int afs_ResyncDisconFiles(struct vrequest *areq, struct AFS_UCRED *acred) tvc->f.ddirty_flags &= ~VDisconCreate; tvc->f.ddirty_flags |= VDisconCreated; } - +#if 0 /* Get server write lock. */ do { tc = afs_Conn(&tvc->f.fid, areq, SHARED_LOCK); @@ -1164,7 +1164,7 @@ int afs_ResyncDisconFiles(struct vrequest *areq, struct AFS_UCRED *acred) if (code) goto next_file; - +#endif if (tvc->f.ddirty_flags & VDisconRename) { /* If we're renaming the file, do so now */ code = afs_ProcessOpRename(tvc, areq); @@ -1228,6 +1228,7 @@ int afs_ResyncDisconFiles(struct vrequest *areq, struct AFS_UCRED *acred) unlock_srv_file: /* Release server write lock. */ +#if 0 do { tc = afs_Conn(&tvc->f.fid, areq, SHARED_LOCK); if (tc) { @@ -1247,7 +1248,7 @@ unlock_srv_file: AFS_STATS_FS_RPCIDX_RELEASELOCK, SHARED_LOCK, NULL)); - +#endif next_file: ObtainWriteLock(&afs_disconDirtyLock, 710); if (code == 0) { diff --git a/src/afs/afs_pioctl.c b/src/afs/afs_pioctl.c index 20b4a851d..dc724aafc 100644 --- a/src/afs/afs_pioctl.c +++ b/src/afs/afs_pioctl.c @@ -4700,11 +4700,11 @@ DECL_PIOCTL(PDiscon) if (force) { afs_DisconDiscardAll(*acred); } + afs_ClearAllStatdFlag(); afs_is_disconnected = 0; afs_is_discon_rw = 0; printf("\nSync succeeded. You are back online.\n"); } - afs_ClearAllStatdFlag(); ReleaseWriteLock(&afs_discon_lock); break; -- 2.39.5