From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Sandeen Subject: Re: fallocate vs ENOSPC Date: Tue, 29 Nov 2011 17:19:44 -0600 Message-ID: <4ED56890.60508@sandeen.net> References: <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> <4ED55F0C.7060003@sandeen.net> <20111129230437.GA3241@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]:49384 "EHLO mail.sandeen.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756576Ab1K2XTp (ORCPT ); Tue, 29 Nov 2011 18:19:45 -0500 In-Reply-To: <20111129230437.GA3241@samba2> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On 11/29/11 5:04 PM, Jeremy Allison wrote: > On Tue, Nov 29, 2011 at 04:39:08PM -0600, Eric Sandeen wrote: >> 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 (potenti= ally large) >>>>> file to a (potentially slow) device. If the implementation comple= xity >>>>> and side effects of doing this are sufficiently small, then it's = worth >>>>> 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= for >>>> the common case where someone trying to fit 10 pounds of horse man= ure >>>> in a 5 pound bag, that can be caught very readily without needing = to >>>> use fallocate(2). >>> >>> Yeah, we do that too, if the fallocate call fails. >> >> That seems backwards to me; if fallocate fails, statfs(2) isn't goin= g >> to reveal more space, is it? (modulo metadata issues, anyway?) >=20 > It might if fallocate fails with ENOSYS :-). Doh. Sorry, was not thinking of that failure. :) -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