Message ID | 1438741796-22681-3-git-send-email-trond.myklebust@primarydata.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
This break the block layout client badly. With this patch applied it silently hangs in xfstests generic/001. I'll see if I can get more details out of my test setup. -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Mon, Aug 17, 2015 at 07:42:56AM -0700, Christoph Hellwig wrote: > This break the block layout client badly. With this patch applied > it silently hangs in xfstests generic/001. I'll see if I can > get more details out of my test setup. Seems like it's waiting either forever or frequently in this callchain: [<ffffffff81d30f24>] rpc_wait_bit_killable+0x34/0x80 [<ffffffff81d30ee8>] __rpc_wait_for_completion_task+0x28/0x30 [<ffffffff8138a7cc>] nfs4_do_close+0x1dc/0x2d0 [<ffffffff8139a429>] __nfs4_close+0xd9/0x180 [<ffffffff8139a503>] nfs4_close_sync+0x13/0x20 [<ffffffff81380035>] nfs4_close_context+0x25/0x30 [<ffffffff81363a43>] __put_nfs_open_context+0xc3/0x110 [<ffffffff8136588c>] nfs_release+0x9c/0xb0 [<ffffffff81362581>] nfs_file_release+0x41/0x60 [<ffffffff811dca02>] __fput+0xa2/0x1e0 [<ffffffff811dcb79>] ____fput+0x9/0x10 [<ffffffff810e52b6>] task_work_run+0x96/0xb0 [<ffffffff810c89dc>] do_exit+0x2cc/0xa10 [<ffffffff810c91f7>] do_group_exit+0x47/0xc0 [<ffffffff810c9282>] SyS_exit_group+0x12/0x20 [<ffffffff81d80eae>] entry_SYSCALL_64_fastpath+0x12/0x76 [<ffffffffffffffff>] 0xffffffffffffffff Trond, does this pass xfstests generic/001 fine with whatever Server you're testing against? -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c index 5280def00bc4..9147dcaeb546 100644 --- a/fs/nfs/pnfs.c +++ b/fs/nfs/pnfs.c @@ -1105,7 +1105,9 @@ bool pnfs_roc(struct inode *ino) } if (!found) goto out_noroc; - lo->plh_block_lgets++; + if (test_and_set_bit(NFS_LAYOUT_RETURN, &lo->plh_flags)) + goto out_noroc; + lo->plh_return_iomode = IOMODE_ANY; pnfs_get_layout_hdr(lo); /* matched in pnfs_roc_release */ spin_unlock(&ino->i_lock); pnfs_free_lseg_list(&tmp_list); @@ -1133,7 +1135,7 @@ void pnfs_roc_release(struct inode *ino) spin_lock(&ino->i_lock); lo = NFS_I(ino)->layout; - lo->plh_block_lgets--; + pnfs_clear_layoutreturn_waitbit(lo); if (atomic_dec_and_test(&lo->plh_refcount)) { pnfs_detach_layout_hdr(lo); spin_unlock(&ino->i_lock);
If there is an outstanding return-on-close, then we just want new layoutget requests to wait rather than fail. Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> --- fs/nfs/pnfs.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)