lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 22 Sep 2007 00:06:55 +0900
From:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	linux-kernel@...r.kernel.org, linux-mm@...ck.org,
	akpm@...ux-foundation.org, nickpiggin@...oo.com.au,
	ricknu-0@...dent.ltu.se
Subject: Re: [RFC][PATCH] page->mapping clarification [1/3] base functions

On Fri, 21 Sep 2007 13:48:28 +0200
Peter Zijlstra <peterz@...radead.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 from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ