diff options
author | Trond Myklebust <trond.myklebust@primarydata.com> | 2015-08-06 12:06:30 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-09-29 19:26:08 +0200 |
commit | e204275a010138f27bca6bdc24ae6b042cd568e8 (patch) | |
tree | 4f55730000549ad2438f457f8f792b105044f31a /fs/nfs/pnfs_nfs.c | |
parent | 7bc97ee9c3ffd89d6226ec82398f5fbe843164e8 (diff) |
NFS: Don't let the ctime override attribute barriers.
commit 7c2dad99d60c86ec686b3bfdcb787c450a7ea89f upstream.
Chuck reports seeing cases where a GETATTR that happens to race
with an asynchronous WRITE is overriding the file size, despite
the attribute barrier being set by the writeback code.
The culprit turns out to be the check in nfs_ctime_need_update(),
which sees that the ctime is newer than the cached ctime, and
assumes that it is safe to override the attribute barrier.
This patch removes that override, and ensures that attribute
barriers are always respected.
Reported-by: Chuck Lever <chuck.lever@oracle.com>
Fixes: a08a8cd375db9 ("NFS: Add attribute update barriers to NFS writebacks")
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/nfs/pnfs_nfs.c')
0 files changed, 0 insertions, 0 deletions