linux-stable/fs/nfs
Trond Myklebust 7c2dad99d6 NFS: Don't let the ctime override attribute barriers.
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: a08a8cd375 ("NFS: Add attribute update barriers to NFS writebacks")
Cc: stable@vger.kernel.org # v4.0+
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
2015-08-17 13:37:21 -05:00
..
blocklayout pnfs: move common blocklayout XDR defintions to nfs4.h 2015-08-17 13:22:49 -05:00
filelayout writeback: separate out include/linux/backing-dev-defs.h 2015-06-02 08:33:34 -06:00
flexfilelayout nfs: remove some dead code in ff_layout_pg_get_mirror_count_write 2015-08-17 13:25:03 -05:00
objlayout NFSv4.1/pnfs: Separate out metadata and data consistency for pNFS 2015-03-27 12:39:38 -04:00
cache_lib.c
cache_lib.h
callback.c NFS: Remove duplicate svc_xprt_put from nfs41_callback_up 2015-08-12 14:42:23 -04:00
callback.h
callback_proc.c NFS: Remove nfs41_server_notify_{target|highest}_slotid_update() 2015-08-17 13:32:00 -05:00
callback_xdr.c NFS: Convert use of __constant_htonl to htonl 2015-06-10 18:57:59 -04:00
client.c NFS: Use RPC functions for matching sockaddrs 2015-08-17 13:29:51 -05:00
delegation.c Merge branch 'bugfixes' 2015-04-23 15:16:27 -04:00
delegation.h NFSv4: Fix races between nfs_remove_bad_delegation() and delegation return 2014-11-12 17:19:04 -05:00
dir.c NFS: Rename nfs_readdir_free_pagearray() and nfs_readdir_large_page() 2015-08-17 13:29:31 -05:00
direct.c NFS client updates for Linux 4.1 2015-04-26 17:33:59 -07:00
dns_resolve.c
dns_resolve.h
file.c NFS: Remove nfs_release() 2015-08-17 13:32:56 -05:00
fscache-index.c NFS: Fabricate fscache server index key correctly 2014-09-25 21:25:18 -04:00
fscache.c nfs: define nfs_inc_fscache_stats and using it as possible 2014-11-24 20:08:47 -05:00
fscache.h
getroot.c VFS: normal filesystems (and lustre): d_inode() annotations 2015-04-15 15:06:57 -04:00
inode.c NFS: Don't let the ctime override attribute barriers. 2015-08-17 13:37:21 -05:00
internal.h NFS: Use RPC functions for matching sockaddrs 2015-08-17 13:29:51 -05:00
iostat.h nfs: define nfs_inc_fscache_stats and using it as possible 2014-11-24 20:08:47 -05:00
Kconfig kernel: conditionally support non-root users, groups and capabilities 2015-04-15 16:35:22 -07:00
Makefile NFS: Rename idmap.c to nfs4idmap.c 2015-04-23 15:16:14 -04:00
mount_clnt.c
namespace.c VFS: normal filesystems (and lustre): d_inode() annotations 2015-04-15 15:06:57 -04:00
netns.h pnfs/blocklayout: serialize GETDEVICEINFO calls 2014-11-12 14:22:52 -05:00
nfs.h
nfs2super.c
nfs2xdr.c nfs: save server READ/WRITE/COMMIT status 2015-02-03 11:06:40 -08:00
nfs3_fs.h nfsv3: introduce nfs3_set_ds_client 2015-02-03 11:06:34 -08:00
nfs3acl.c VFS: normal filesystems (and lustre): d_inode() annotations 2015-04-15 15:06:57 -04:00
nfs3client.c nfs: set hostname when creating nfsv3 ds connection 2015-02-03 11:06:38 -08:00
nfs3proc.c VFS: normal filesystems (and lustre): d_inode() annotations 2015-04-15 15:06:57 -04:00
nfs3super.c nfsv3: introduce nfs3_set_ds_client 2015-02-03 11:06:34 -08:00
nfs3xdr.c xprtrdma: Fix large NFS SYMLINK calls 2015-08-05 16:21:28 -04:00
nfs4_fs.h NFS: Remove nfs41_server_notify_{target|highest}_slotid_update() 2015-08-17 13:32:00 -05:00
nfs4client.c NFS: Use RPC functions for matching sockaddrs 2015-08-17 13:29:51 -05:00
nfs4file.c nfs: verify open flags before allowing open 2015-06-25 19:38:00 -04:00
nfs4getroot.c nfs: Remove invalid NFS_ATTR_FATTR_V4_REFERRAL checking in nfs4_get_rootfh 2015-07-01 11:31:22 -04:00
nfs4idmap.c NFS: Combine nfs_idmap_{init|quit}() and nfs_idmap_{init|quit}_keyring() 2015-08-17 13:29:56 -05:00
nfs4idmap.h NFS: Move nfs_idmap.h into fs/nfs/ 2015-04-23 15:16:14 -04:00
nfs4namespace.c VFS: normal filesystems (and lustre): d_inode() annotations 2015-04-15 15:06:57 -04:00
nfs4proc.c NFS: Remove nfs41_server_notify_{target|highest}_slotid_update() 2015-08-17 13:32:00 -05:00
nfs4renewd.c NFSv4.1: Fix an NFSv4.1 state renewal regression 2014-09-30 17:18:42 -04:00
nfs4session.c NFSv4.1: Don't set up a backchannel if the server didn't agree to do so 2015-02-18 12:30:47 -08:00
nfs4session.h NFSv4.1: Clear the old state by our client id before establishing a new lease 2015-03-03 21:52:30 -05:00
nfs4state.c NFS: Remove nfs41_server_notify_{target|highest}_slotid_update() 2015-08-17 13:32:00 -05:00
nfs4super.c NFS: Move nfs_idmap.h into fs/nfs/ 2015-04-23 15:16:14 -04:00
nfs4sysctl.c NFS: Move nfs_idmap.h into fs/nfs/ 2015-04-23 15:16:14 -04:00
nfs4trace.c
nfs4trace.h VFS: normal filesystems (and lustre): d_inode() annotations 2015-04-15 15:06:57 -04:00
nfs4xdr.c xprtrdma: Fix large NFS SYMLINK calls 2015-08-05 16:21:28 -04:00
nfs42.h NFSv.2/pnfs Add a LAYOUTSTATS rpc function 2015-06-24 10:17:37 -04:00
nfs42proc.c NFSv4.2: handle NFS-specific llseek errors 2015-07-27 11:16:25 -04:00
nfs42xdr.c NFSv4.2: Fix up a decoding error in layoutstats 2015-06-27 11:30:57 -04:00
nfsroot.c NFS: a couple off by ones 2015-01-30 20:43:30 -05:00
nfstrace.c NFSv4: Allow tracing of NFSv4 fsync calls 2015-03-27 12:39:34 -04:00
nfstrace.h
pagelist.c NFS: nfs_set_pgio_error sometimes misses errors 2015-08-17 13:05:03 -05:00
pnfs.c NFSv4.1/pnfs: Remove redundant wakeup in pnfs_send_layoutreturn() 2015-08-12 14:56:19 -04:00
pnfs.h NFSv4.2/pnfs: Use GFP_NOIO for layoutstat reporting in the writeback path 2015-08-12 14:27:23 -04:00
pnfs_dev.c NFSv4.1: Don't cache deviceids that have no notifications 2015-03-27 12:32:24 -04:00
pnfs_nfs.c Merge branch 'layoutfixes' 2015-08-17 13:36:32 -05:00
proc.c VFS: normal filesystems (and lustre): d_inode() annotations 2015-04-15 15:06:57 -04:00
read.c NFS client updates for Linux 4.1 2015-04-26 17:33:59 -07:00
super.c NFS: Error out when register_shrinker fail in register_nfs_fs 2015-08-12 14:42:23 -04:00
symlink.c don't pass nameidata to ->follow_link() 2015-05-10 22:20:15 -04:00
sysctl.c nfs: convert use of typedef ctl_table to struct ctl_table 2014-06-06 16:08:16 -07:00
unlink.c VFS: normal filesystems (and lustre): d_inode() annotations 2015-04-15 15:06:57 -04:00
write.c NFS: Rename nfs_commit_unstable_pages() to nfs_write_inode() 2015-08-17 13:32:32 -05:00