[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4ECB3587.3020909@redhat.com>
Date: Tue, 22 Nov 2011 13:39:19 +0800
From: Cong Wang <amwang@...hat.com>
To: Hugh Dickins <hughd@...gle.com>
CC: linux-kernel@...r.kernel.org, akpm@...ux-foundation.org,
Pekka Enberg <penberg@...nel.org>,
Dave Hansen <dave@...ux.vnet.ibm.com>,
Lennart Poettering <lennart@...ttering.net>,
Kay Sievers <kay.sievers@...y.org>,
KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
Christoph Hellwig <hch@...radead.org>, linux-mm@...ck.org
Subject: Re: [V2 PATCH] tmpfs: add fallocate support
于 2011年11月21日 05:22, Hugh Dickins 写道:
> On Fri, 18 Nov 2011, Cong Wang wrote:
>
>> It seems that systemd needs tmpfs to support fallocate,
>> see http://lkml.org/lkml/2011/10/20/275. This patch adds
>> fallocate support to tmpfs.
>>
>> As we already have shmem_truncate_range(), it is also easy
>> to add FALLOC_FL_PUNCH_HOLE support too.
>
> Thank you, this version looks much much nicer.
>
> I wouldn't call it bug-free (don't you need a page_cache_release
> after the unlock_page?), and I won't be reviewing it and testing it
> for a week or two - there's a lot about the semantics of fallocate
> and punch-hole that's not obvious, and I'll have to study the mail
> threads discussing them before checking your patch.
Yeah, sorry, I missed unlock_page()...
>
> First question that springs to mind (to which I shall easily find
> an answer): is it actually acceptable for fallocate() to return
> -ENOSPC when it has already completed a part of the work?
Ah, good point, I will fix this as what Christoph suggested.
>
> But so long as the details don't end up complicating this
> significantly, since we anyway want to regularize the punch-hole
> situation by giving tmpfs the same interface to it as other filesystems,
> I now think it would be a bit perverse to disallow the original
> fallocate functionality that you implement here in-kernel.
>
Ok, I think you mean you are fine to accept it now?
Anyway, thanks a lot for your comments!
--
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