disconnected-reply-no-locking-yet-20090128
authorSimon Wilkinson <sxw@inf.ed.ac.uk>
Wed, 28 Jan 2009 21:02:16 +0000 (21:02 +0000)
committerDerrick Brashear <shadow@dementia.org>
Wed, 28 Jan 2009 21:02:16 +0000 (21:02 +0000)
LICENSE IPL10
FIXES 124202

don't lock files before replaying changes yet

src/afs/afs_disconnected.c
src/afs/afs_pioctl.c

index 46554e4..b4feef7 100644 (file)
@@ -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) {
index 0ded19c..6ed5550 100644 (file)
@@ -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;