From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeremy Allison Subject: Re: fallocate vs ENOSPC Date: Mon, 28 Nov 2011 12:49:38 -0800 Message-ID: <20111128204938.GB12171@samba2> 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> Reply-To: Jeremy Allison Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: =?iso-8859-1?Q?P=E1draig?= Brady , Dave Chinner , Christoph Hellwig , linux-fsdevel@vger.kernel.org To: Ted Ts'o Return-path: Received: from fn.samba.org ([216.83.154.106]:41074 "EHLO lists.samba.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754036Ab1K1Utm (ORCPT ); Mon, 28 Nov 2011 15:49:42 -0500 Content-Disposition: inline In-Reply-To: <20111128202934.GE4348@thunk.org> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: 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. >=20 > 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 fo= r > the common case where someone trying to fit 10 pounds of horse manure > 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. -- 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