linux-sg2042/fs/exofs
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
..
BUGS exofs: Documentation 2009-03-31 19:44:38 +03:00
Kbuild exofs: switch to {simple,page}_symlink_inode_operations 2015-05-10 22:18:27 -04:00
Kconfig ore: FIX breakage when MISC_FILESYSTEMS is not set 2012-01-06 16:48:14 +02:00
Kconfig.ore ore: Support for raid 6 2014-05-22 14:48:15 +03:00
common.h Boaz Harrosh - Fix broken email address 2014-10-19 20:22:32 +03:00
dir.c pagemap.h: move dir_pages() over there 2015-06-23 18:02:00 -04:00
exofs.h exofs: switch to {simple,page}_symlink_inode_operations 2015-05-10 22:18:27 -04:00
file.c make new_sync_{read,write}() static 2015-04-11 22:29:40 -04:00
inode.c osd fs: __r4w_get_page rely on PageUptodate for uptodate 2015-12-12 10:15:34 -08:00
namei.c fs/exofs/namei.c: remove unnecessary new_valid_dev() check 2015-11-09 15:11:24 -08:00
ore.c Boaz Harrosh - Fix broken email address 2014-10-19 20:22:32 +03:00
ore_raid.c Boaz Harrosh - Fix broken email address 2014-10-19 20:22:32 +03:00
ore_raid.h Boaz Harrosh - Fix broken email address 2014-10-19 20:22:32 +03:00
super.c VFS: normal filesystems (and lustre): d_inode() annotations 2015-04-15 15:06:57 -04:00
sys.c Boaz Harrosh - Fix broken email address 2014-10-19 20:22:32 +03:00