[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4ED4888E.9040402@redhat.com>
Date: Tue, 29 Nov 2011 15:23:58 +0800
From: Cong Wang <amwang@...hat.com>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
CC: linux-kernel@...r.kernel.org, akpm@...ux-foundation.org,
Pekka Enberg <penberg@...nel.org>,
Christoph Hellwig <hch@....de>,
Hugh Dickins <hughd@...gle.com>,
Dave Hansen <dave@...ux.vnet.ibm.com>,
Lennart Poettering <lennart@...ttering.net>,
Kay Sievers <kay.sievers@...y.org>,
KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
linux-mm@...ck.org
Subject: Re: [V4 PATCH 1/2] tmpfs: add fallocate support
于 2011年11月29日 14:02, KAMEZAWA Hiroyuki 写道:
>
> You can't know whether the 'page' is allocated by alloc_page() in fallocate()
> or just found as exiting one.
> Then, yourwill corrupt existing pages in error path.
> Is it allowed ?
>
According to the comment,
/*
* shmem_getpage_gfp - find page in cache, or get from swap, or allocate
*
* If we allocate a new one we do not mark it dirty. That's up to the
* vm. If we swap it in we mark it dirty since we also free the swap
* entry since a page cannot live in both the swap and page cache
*/
so we can know if the page is newly allocated by checking page dirty bit.
Or am I missing something?
But whoops, I sent a wrong version of this patch, the below one is
the correct one. Sorry for this.
View attachment "0001-tmpfs-add-fallocate-support.patch" of type "text/plain" (4320 bytes)
Powered by blists - more mailing lists