pNFS: Files and flexfiles always need to commit before layoutcommit
authorTrond Myklebust <trond.myklebust@primarydata.com>
Sun, 26 Jun 2016 22:54:58 +0000 (18:54 -0400)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Tue, 5 Jul 2016 23:08:01 +0000 (19:08 -0400)
commit2e18d4d822ea9cc811ea26a880cf2ed47cbf8889
tree1ce746bef1598990b96f6f5b4e0c11017a3c9ee7
parentbc28e1c2e3c8a4c5198ebfd8bbae0afd73dfafd5
pNFS: Files and flexfiles always need to commit before layoutcommit

So ensure that we mark the layout for commit once the write is done,
and then ensure that the commit to ds is finished before sending
layoutcommit.

Note that by doing this, we're able to optimise away the commit
for the case of servers that don't need layoutcommit in order to
return updated attributes.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
fs/nfs/filelayout/filelayout.c
fs/nfs/flexfilelayout/flexfilelayout.c
fs/nfs/nfs4xdr.c
fs/nfs/pnfs.c
fs/nfs/pnfs_nfs.c