* [PATCH v6 0/4] xfs: seek_data/seek_hole refinements
@ 2012-08-03 6:10 Jeff Liu
0 siblings, 0 replies; only message in thread
From: Jeff Liu @ 2012-08-03 6:10 UTC (permalink / raw)
To: xfs
Hello,
This is the new version of supplying xfs_seek_data/xfs_seek_hole refinements by probing page cache
to find out the desired offset for unwritten extents.
Hi Dave,
According to your comments for v5, we have to check both page->index && page->mapping after locking a page due to
memory reclaim or truncate. For page->mapping, it definitely need to check up again as it may be invalidated or
truncated. For page->index, we have a reference on this page at pagevec_lookup(), to this point, its mapping may
be set to NULL, but it would still resides in cache or swap space IMHO, so the index will not change because of that.
I think I must missing something in this point, could you please give some hints?
Changes from v6 to v5:
- Fix off-by-one bug for calculating the number of pages to be mapped.
- Fix a few comments according to Mark and Dave's comments.
- Introduce a new helper routine xfs_lookup_buffer_offset() to lookup the desired offset from one page.
This could help reducing one level of indention at xfs_find_get_pgoff().
- Verify page->mapping after page got locked at xfs_find_get_pgoff() as a searched page may be invalidated/truncated
at memory reclarim or page truncation stage.
- xfs_seek_data()/xfs_seek_hole(): loop bodys are indent by one level as for if statements.
Old version:
Version 5 of this posting can be found at
http://www.spinics.net/lists/xfs/msg12987.html
Version 4 of this posting can be found at
http://oss.sgi.com/archives/xfs/2012-07/msg00279.html
Version 3 of this posting can be found at
http://oss.sgi.com/archives/xfs/2012-07/msg00050.html
Version 2 of this posting can be found at
http://oss.sgi.com/archives/xfs/2012-06/msg00407.html
Version 1 of this posting can be found at
http://www.digipedia.pl/usenet/thread/11980/26875/
Thanks,
-Jeff
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-08-03 6:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-03 6:10 [PATCH v6 0/4] xfs: seek_data/seek_hole refinements Jeff Liu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox