This is a note to let you know that I've just added the patch titled

    NFS: Remove bad delegations during open recovery

to the 3.6-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     nfs-remove-bad-delegations-during-open-recovery.patch
and it can be found in the queue-3.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From 6938867edba929a65a167a97581231e76aeb10b4 Mon Sep 17 00:00:00 2001
From: Bryan Schumaker <[email protected]>
Date: Wed, 26 Sep 2012 15:25:52 -0400
Subject: NFS: Remove bad delegations during open recovery

From: Bryan Schumaker <[email protected]>

commit 6938867edba929a65a167a97581231e76aeb10b4 upstream.

I put the client into an open recovery loop by:
        Client: Open file
                read half
        Server: Expire client (echo 0 > /sys/kernel/debug/nfsd/forget_clients)
        Client: Drop vm cache (echo 3 > /proc/sys/vm/drop_caches)
                finish reading file

This causes a loop because the client never updates the nfs4_state after
discovering that the delegation is invalid.  This means it will keep
trying to read using the bad delegation rather than attempting to re-open
the file.

Signed-off-by: Bryan Schumaker <[email protected]>
Signed-off-by: Trond Myklebust <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 fs/nfs/nfs4proc.c |    4 ++++
 1 file changed, 4 insertions(+)

--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -1774,7 +1774,11 @@ static void nfs41_clear_delegation_state
                 * informs us the stateid is unrecognized. */
                if (status != -NFS4ERR_BAD_STATEID)
                        nfs41_free_stateid(server, stateid);
+               nfs_remove_bad_delegation(state->inode);
 
+               write_seqlock(&state->seqlock);
+               nfs4_stateid_copy(&state->stateid, &state->open_stateid);
+               write_sequnlock(&state->seqlock);
                clear_bit(NFS_DELEGATED_STATE, &state->flags);
        }
 }


Patches currently in stable-queue which might be from [email protected] are

queue-3.6/nfs-remove-bad-delegations-during-open-recovery.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to