From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
akpm@linux-foundation.org, nickpiggin@yahoo.com.au,
ricknu-0@student.ltu.se
Subject: Re: [RFC][PATCH] page->mapping clarification [1/3] base functions
Date: Sat, 22 Sep 2007 00:06:55 +0900 [thread overview]
Message-ID: <20070922000655.6ab383bf.kamezawa.hiroyu@jp.fujitsu.com> (raw)
In-Reply-To: <20070921134828.45ca967e@twins>
On Fri, 21 Sep 2007 13:48:28 +0200
Peter Zijlstra <peterz@infradead.org> wrote:
> > Followings are moved
> > * page_mapping() ... returns swapper_space or address_space a page is on.
> > (from mm.h)
> > * page_index() ... returns position of a page in its inode
> > (from mm.h)
> > * remove_mapping() ... a safe routine to remove page->mapping from page.
> > (from swap.h)
>
> I have two other functions that might want integration with this scheme:
>
> page_file_mapping() ... returns backing address space
> page_file_index() ... returns the index therein
>
> They are identical to page_mapping_cache() and page_index() for
> page cache pages, but they also work on swap cache pages.
>
> That is, for swapcache pages they return:
>
> page_file_mapping:
> page_swap_info(page)->swap_file->f_mapping
>
> page_file_index:
> swp_offset((swp_offset_t)page_private(page))
>
> When a filesystem uses these functions instead of page->mapping and
> page->index, it allows passing swap cache pages into the regular
> filesystem read/write paths.
>
Oh,
> This is useful for things like swap over NFS, where swap is backed by a
> swapfile on a 'regular' filesystem.
>
Okay, I'll try to add them in the next set.
Thanks,
-Kame
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
prev parent reply other threads:[~2007-09-21 15:06 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-19 7:43 KAMEZAWA Hiroyuki
2007-09-19 7:44 ` [RFC][PATCH] page->mapping clarification [2/3] changes in /mm KAMEZAWA Hiroyuki
2007-09-19 7:46 ` [RFC][PATCH] page->mapping clarification [3/3] changes in /fs generic KAMEZAWA Hiroyuki
2007-09-20 18:26 ` [RFC][PATCH] page->mapping clarification [1/3] base functions Christoph Lameter
2007-09-21 0:50 ` KAMEZAWA Hiroyuki
2007-09-21 17:02 ` Hugh Dickins
2007-09-21 18:42 ` KAMEZAWA Hiroyuki
2007-09-26 19:31 ` Hugh Dickins
2007-09-26 21:50 ` KAMEZAWA Hiroyuki
2007-09-21 11:48 ` Peter Zijlstra
2007-09-21 15:06 ` KAMEZAWA Hiroyuki [this message]
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=20070922000655.6ab383bf.kamezawa.hiroyu@jp.fujitsu.com \
--to=kamezawa.hiroyu@jp.fujitsu.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=nickpiggin@yahoo.com.au \
--cc=peterz@infradead.org \
--cc=ricknu-0@student.ltu.se \
/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