From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Sandeen Subject: Re: fallocate vs ENOSPC Date: Tue, 29 Nov 2011 16:39:08 -0600 Message-ID: <4ED55F0C.7060003@sandeen.net> References: <4ECF6D41.2040801@draigBrady.com> <20111125104050.GA26729@infradead.org> <20111127031455.GK5167@thunk.org> <20111127234331.GW2386@dastard> <20111128051054.GZ2386@dastard> <4ED34C66.8050300@draigBrady.com> <4ED39FE2.7010609@draigBrady.com> <20111128202934.GE4348@thunk.org> <20111128204938.GB12171@samba2> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Ted Ts'o , =?ISO-8859-1?Q?P=E1draig_Brady?= , Dave Chinner , Christoph Hellwig , linux-fsdevel@vger.kernel.org To: Jeremy Allison Return-path: Received: from sandeen.net ([63.231.237.45]:53897 "EHLO mail.sandeen.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753308Ab1K2W5E (ORCPT ); Tue, 29 Nov 2011 17:57:04 -0500 In-Reply-To: <20111128204938.GB12171@samba2> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On 11/28/11 2:49 PM, Jeremy Allison wrote: > On Mon, Nov 28, 2011 at 03:29:34PM -0500, Ted Ts'o wrote: >> On Mon, Nov 28, 2011 at 02:51:14PM +0000, P=E1draig Brady wrote: >>> It would be better to indicate ENOSPC _before_ copying a (potential= ly large) >>> file to a (potentially slow) device. If the implementation complexi= ty >>> and side effects of doing this are sufficiently small, then it's wo= rth >>> doing. These discussions are to quantify the side effects. >> >> In that case, why not use statfs(2) as a first class approximation? >> You won't know for user how much fs metadata will be required, but f= or >> the common case where someone trying to fit 10 pounds of horse manur= e >> in a 5 pound bag, that can be caught very readily without needing to >> use fallocate(2). >=20 > Yeah, we do that too, if the fallocate call fails. That seems backwards to me; if fallocate fails, statfs(2) isn't going to reveal more space, is it? (modulo metadata issues, anyway?) -Eric -- 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