From: Jeff Liu <jeff.liu@oracle.com>
To: xfs@oss.sgi.com
Subject: [PATCH v6 0/4] xfs: seek_data/seek_hole refinements
Date: Thu, 2 Aug 2012 23:10:07 -0700 (PDT) [thread overview]
Message-ID: <501B6B3F.7040502@oracle.com> (raw)
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
reply other threads:[~2012-08-03 6:11 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=501B6B3F.7040502@oracle.com \
--to=jeff.liu@oracle.com \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox