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]
Message-ID: <4ECDB6E6.40304@redhat.com>
Date:	Thu, 24 Nov 2011 11:15:50 +0800
From:	Cong Wang <amwang@...hat.com>
To:	Hugh Dickins <hughd@...gle.com>
CC:	Pekka Enberg <penberg@...nel.org>,
	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
	linux-kernel@...r.kernel.org, akpm@...ux-foundation.org,
	Christoph Hellwig <hch@....de>,
	Dave Hansen <dave@...ux.vnet.ibm.com>,
	Lennart Poettering <lennart@...ttering.net>,
	Kay Sievers <kay.sievers@...y.org>, linux-mm@...ck.org
Subject: Re: [V3 PATCH 1/2] tmpfs: add fallocate support

于 2011年11月24日 06:20, Hugh Dickins 写道:
> On Wed, 23 Nov 2011, Pekka Enberg wrote:
>>
>> Why do we need to undo anyway?
...
> Another answer would be: if fallocate() had been defined to return
> the length that has been successfully allocated (as write() returns
> the length written), then it would be reasonable to return partial
> length instead of failing with ENOSPC, and not undo.  But it was
> defined to return -1 on failure or 0 on success, so cannot report
> partial success.
>
> Another answer would be: if the disk is near full, it's not good
> for a fallocate() to fail with -ENOSPC while nonetheless grabbing
> all the remaining blocks; even worse if another fallocate() were
> racing with it.

Exactly, fallocate() should not make the bad situation even worse.

Thanks.
--
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