pNFS: Ensure we layoutcommit before revalidating attributes
authorTrond Myklebust <trond.myklebust@primarydata.com>
Tue, 5 Jul 2016 17:46:53 +0000 (13:46 -0400)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Tue, 5 Jul 2016 23:08:27 +0000 (19:08 -0400)
commitac46bd374c9a838874c450c528e2e922ee748ff9
tree412f64704197188b32b3c31122ba9768e3ba1b21
parent2e18d4d822ea9cc811ea26a880cf2ed47cbf8889
pNFS: Ensure we layoutcommit before revalidating attributes

If we need to update the cached attributes, then we'd better make
sure that we also layoutcommit first. Otherwise, the server may have stale
attributes.

Prior to this patch, the revalidation code tried to "fix" this problem by
simply disabling attributes that would be affected by the layoutcommit.
That approach breaks nfs_writeback_check_extend(), leading to a file size
corruption.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
fs/nfs/inode.c