alistair23-linux/fs/nfs
Hugh Dickins 3066a9670b osd fs: __r4w_get_page rely on PageUptodate for uptodate
Commit 42cb14b110 ("mm: migrate dirty page without
clear_page_dirty_for_io etc") simplified the migration of a PageDirty
pagecache page: one stat needs moving from zone to zone and that's about
all.

It's convenient and safest for it to shift the PageDirty bit from old
page to new, just before updating the zone stats: before copying data
and marking the new PageUptodate.  This is all done while both pages are
isolated and locked, just as before; and just as before, there's a
moment when the new page is visible in the radix_tree, but not yet
PageUptodate.  What's new is that it may now be briefly visible as
PageDirty before it is PageUptodate.

When I scoured the tree to see if this could cause a problem anywhere,
the only places I found were in two similar functions __r4w_get_page():
which look up a page with find_get_page() (not using page lock), then
claim it's uptodate if it's PageDirty or PageWriteback or PageUptodate.

I'm not sure whether that was right before, but now it might be wrong
(on rare occasions): only claim the page is uptodate if PageUptodate.
Or perhaps the page in question could never be migratable anyway?

Signed-off-by: Hugh Dickins <hughd@google.com>
Tested-by: Boaz Harrosh <ooo@electrozaur.com>
Cc: Benny Halevy <bhalevy@panasas.com>
Cc: Trond Myklebust <trond.myklebust@primarydata.com>
Cc: Christoph Lameter <cl@linux.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-12-12 10:15:34 -08:00
..
blocklayout nfs/blocklayout: Fix bad using of page offset in bl_read_pagelist 2015-10-21 15:55:47 -05:00
filelayout nfs/filelayout: Fix NULL reference caused by double freeing of fh_array 2015-09-17 18:10:28 -04:00
flexfilelayout pNFS/flexfiles: Add support for FF_FLAGS_NO_IO_THRU_MDS 2015-11-02 13:50:37 -05:00
objlayout osd fs: __r4w_get_page rely on PageUptodate for uptodate 2015-12-12 10:15:34 -08:00
cache_lib.c
cache_lib.h
callback.c NFS: Enable client side NFSv4.1 backchannel to use other transports 2015-11-02 16:29:13 -05:00
callback.h NFS: Remove the left function defines in callback.h 2015-10-21 15:49:22 -05:00
callback_proc.c NFS: Remove unneeded NFS_DEBUG checking before define NFSDBG_FACILITY 2015-10-21 15:49:23 -05:00
callback_xdr.c nfs4: limit callback decoding to received bytes 2015-11-23 22:03:15 -05:00
client.c nfs: get clone_blksize when probing fsinfo 2015-10-15 16:08:18 -04:00
delegation.c NFSv4: Don't use synchronous delegation recall in exception handling 2015-10-08 10:45:53 -04:00
delegation.h NFSv4: Recovery of recalled read delegations is broken 2015-09-20 22:34:16 -04:00
dir.c fs/nfs: remove unnecessary new_valid_dev check 2015-11-03 12:31:34 -05:00
direct.c NFS: Skip checking ds_cinfo.buckets when lseg's commit_through_mds is set 2015-09-22 18:09:14 -04:00
dns_resolve.c
dns_resolve.h
file.c mm, page_alloc: distinguish between being unable to sleep, unwilling to sleep and avoiding waking kswapd 2015-11-06 17:50:42 -08:00
fscache-index.c
fscache.c
fscache.h
getroot.c
inode.c nfs: if we have no valid attrs, then don't declare the attribute cache valid 2015-11-25 15:31:49 -05:00
internal.h NFSv4: Respect the server imposed limit on how many changes we may cache 2015-09-07 12:36:17 -04:00
iostat.h
Kconfig
Makefile
mount_clnt.c NFS: Remove unneeded NFS_DEBUG checking before define NFSDBG_FACILITY 2015-10-21 15:49:23 -05:00
namespace.c
netns.h
nfs.h
nfs2super.c
nfs2xdr.c
nfs3_fs.h
nfs3acl.c
nfs3client.c
nfs3proc.c
nfs3super.c
nfs3xdr.c xprtrdma: Fix large NFS SYMLINK calls 2015-08-05 16:21:28 -04:00
nfs4_fs.h NFSv4: Refactor NFSv4 error handling 2015-10-08 10:45:51 -04:00
nfs4client.c nfs4: start callback_ident at idr 1 2015-11-23 21:59:42 -05:00
nfs4file.c nfs: reduce the amount of ifdefs for v4.2 in nfs4file.c 2015-11-23 21:53:14 -05: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 KEYS: Merge the type-specific data with the payload data 2015-10-21 15:18:36 +01:00
nfs4idmap.h
nfs4namespace.c
nfs4proc.c nfs: use sliding delay when LAYOUTGET gets NFS4ERR_DELAY 2015-11-23 21:57:44 -05:00
nfs4renewd.c
nfs4session.c
nfs4session.h
nfs4state.c NFSv4: Don't try to reclaim unused state owners 2015-10-02 15:43:07 -04:00
nfs4super.c
nfs4sysctl.c
nfs4trace.c
nfs4trace.h NFS: Fix a tracepoint NULL-pointer dereference 2015-10-06 18:56:25 -04:00
nfs4xdr.c NFS4: Cleanup FATTR4_WORD0_FS_LOCATIONS after decoding success 2015-11-23 21:56:53 -05:00
nfs42.h nfs42: add CLONE proc functions 2015-10-15 16:07:36 -04:00
nfs42proc.c NFS: Properly set NFS v4.2 NFSDBG_FACILITY 2015-11-23 21:53:59 -05:00
nfs42xdr.c nfs42: add CLONE xdr functions 2015-10-15 16:07:21 -04:00
nfsroot.c nfsroot: make nfsroot to accept the 1024 bytes long directory name 2015-10-21 15:49:19 -05:00
nfstrace.c
nfstrace.h
pagelist.c nfs: fix pg_test page count calculation 2015-09-17 15:48:23 -04:00
pnfs.c nfs4: resend LAYOUTGET when there is a race that changes the seqid 2015-11-25 15:32:13 -05:00
pnfs.h NFS41: make close wait for layoutreturn 2015-09-23 08:55:32 -04:00
pnfs_dev.c
pnfs_nfs.c NFS41: fix list splice type 2015-08-20 13:43:53 -05:00
proc.c
read.c NFSv4.1/pnfs: Retry through MDS when getting bad length of data 2015-10-21 15:55:47 -05:00
super.c NFS: Remove the left global variable nfs_callback_tcpport 2015-10-21 15:49:22 -05:00
symlink.c
sysctl.c
unlink.c
write.c NFSv4.1/pnfs: Retry through MDS when getting bad length of data 2015-10-21 15:55:47 -05:00