This is a note to let you know that I've just added the patch titled
NFSv4.1: Remove a bogus BUG_ON() in nfs4_layoutreturn_done
to the 3.5-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:
nfsv4.1-remove-a-bogus-bug_on-in-nfs4_layoutreturn_done.patch
and it can be found in the queue-3.5 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From 47fbf7976e0b7d9dcdd799e2a1baba19064d9631 Mon Sep 17 00:00:00 2001
From: Trond Myklebust <[email protected]>
Date: Wed, 8 Aug 2012 16:03:13 -0400
Subject: NFSv4.1: Remove a bogus BUG_ON() in nfs4_layoutreturn_done
From: Trond Myklebust <[email protected]>
commit 47fbf7976e0b7d9dcdd799e2a1baba19064d9631 upstream.
Ever since commit 0a57cdac3f (NFSv4.1 send layoutreturn to fence
disconnected data server) we've been sending layoutreturn calls
while there is potentially still outstanding I/O to the data
servers. The reason we do this is to avoid races between replayed
writes to the MDS and the original writes to the DS.
When this happens, the BUG_ON() in nfs4_layoutreturn_done can
be triggered because it assumes that we would never call
layoutreturn without knowing that all I/O to the DS is
finished. The fix is to remove the BUG_ON() now that the
assumptions behind the test are obsolete.
Reported-by: Boaz Harrosh <[email protected]>
Reported-by: Tigran Mkrtchyan <[email protected]>
Signed-off-by: Trond Myklebust <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
fs/nfs/nfs4proc.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -6300,12 +6300,8 @@ static void nfs4_layoutreturn_done(struc
return;
}
spin_lock(&lo->plh_inode->i_lock);
- if (task->tk_status == 0) {
- if (lrp->res.lrs_present) {
- pnfs_set_layout_stateid(lo, &lrp->res.stateid, true);
- } else
- BUG_ON(!list_empty(&lo->plh_segs));
- }
+ if (task->tk_status == 0 && lrp->res.lrs_present)
+ pnfs_set_layout_stateid(lo, &lrp->res.stateid, true);
lo->plh_block_lgets--;
spin_unlock(&lo->plh_inode->i_lock);
dprintk("<-- %s\n", __func__);
Patches currently in stable-queue which might be from
[email protected] are
queue-3.5/nfsv4.1-remove-a-bogus-bug_on-in-nfs4_layoutreturn_done.patch
queue-3.5/pnfs-defer-release-of-pages-in-layoutget.patch
queue-3.5/nfsv3-ensure-that-do_proc_get_root-reports-errors-correctly.patch
queue-3.5/nfs-tear-down-caches-in-nfs_init_writepagecache-when-allocation-fails.patch
queue-3.5/nfs-clear-key-construction-data-if-the-idmap-upcall-fails.patch
queue-3.5/nfs-return-enokey-when-the-upcall-fails-to-map-the-name.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