1 From c001c87a63aa2f35358e33eb05e45e4cbcb34f54 Mon Sep 17 00:00:00 2001
2 From: Trond Myklebust <trond.myklebust@primarydata.com>
3 Date: Sun, 26 Jun 2016 12:39:49 -0400
4 Subject: pNFS/flexfiles: Fix layoutcommit after a commit to DS
6 From: Trond Myklebust <trond.myklebust@primarydata.com>
8 commit c001c87a63aa2f35358e33eb05e45e4cbcb34f54 upstream.
10 We should always do a layoutcommit after commit to DS, except if
11 the layout segment we're using has set FF_FLAGS_NO_LAYOUTCOMMIT.
13 Fixes: d67ae825a59d ("pnfs/flexfiles: Add the FlexFile Layout Driver")
14 Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
15 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
18 fs/nfs/flexfilelayout/flexfilelayout.c | 3 +--
19 1 file changed, 1 insertion(+), 2 deletions(-)
21 --- a/fs/nfs/flexfilelayout/flexfilelayout.c
22 +++ b/fs/nfs/flexfilelayout/flexfilelayout.c
23 @@ -1529,8 +1529,7 @@ static int ff_layout_commit_done_cb(stru
27 - if (data->verf.committed == NFS_UNSTABLE
28 - && ff_layout_need_layoutcommit(data->lseg))
29 + if (ff_layout_need_layoutcommit(data->lseg))
30 pnfs_set_layoutcommit(data->inode, data->lseg, data->lwb);