From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail138.messagelabs.com (mail138.messagelabs.com [216.82.249.35]) by kanga.kvack.org (Postfix) with SMTP id 74AEE6B00A5 for ; Wed, 23 Nov 2011 22:16:09 -0500 (EST) Message-ID: <4ECDB6E6.40304@redhat.com> Date: Thu, 24 Nov 2011 11:15:50 +0800 From: Cong Wang MIME-Version: 1.0 Subject: Re: [V3 PATCH 1/2] tmpfs: add fallocate support References: <1322038412-29013-1-git-send-email-amwang@redhat.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Sender: owner-linux-mm@kvack.org List-ID: To: Hugh Dickins Cc: Pekka Enberg , KOSAKI Motohiro , linux-kernel@vger.kernel.org, akpm@linux-foundation.org, Christoph Hellwig , Dave Hansen , Lennart Poettering , Kay Sievers , linux-mm@kvack.org ao? 2011a1'11ae??24ae?JPY 06:20, Hugh Dickins a??e??: > 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, 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/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: email@kvack.org