From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ted Ts'o Subject: Re: fallocate vs ENOSPC Date: Wed, 30 Nov 2011 10:32:02 -0500 Message-ID: <20111130153202.GA9251@thunk.org> References: <20111125104050.GA26729@infradead.org> <20111127031455.GK5167@thunk.org> <20111127234331.GW2386@dastard> <20111128051054.GZ2386@dastard> <4ED34C66.8050300@draigBrady.com> <20111129002432.GA2386@dastard> <4ED4E824.4030107@draigBrady.com> <20111129233729.GS7046@dastard> <4ED5F740.8090005@draigBrady.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Dave Chinner , Christoph Hellwig , linux-fsdevel@vger.kernel.org To: =?iso-8859-1?Q?P=E1draig?= Brady Return-path: Received: from li9-11.members.linode.com ([67.18.176.11]:46666 "EHLO test.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752377Ab1K3PcT (ORCPT ); Wed, 30 Nov 2011 10:32:19 -0500 Content-Disposition: inline In-Reply-To: <4ED5F740.8090005@draigBrady.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Wed, Nov 30, 2011 at 09:28:32AM +0000, P=E1draig Brady wrote: >=20 > But then posix_fallocate() would always be slow I think, > requiring one to actually write the NULs. Almost no one should ever use posix_fallocate(); it's can be a performance disaster because you don't know whether or not the file system will really do fallocate, or will do the slow "write zeros" thing. You really should use fallocate(), take the failure if the file system doesn't support fallocate, and then you can decide what the appropriate thing to do might be. - Ted -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel= " in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html