From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ted Ts'o Subject: Re: fallocate vs ENOSPC Date: Mon, 28 Nov 2011 15:29:34 -0500 Message-ID: <20111128202934.GE4348@thunk.org> 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> 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]:60243 "EHLO test.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754656Ab1K1U3s (ORCPT ); Mon, 28 Nov 2011 15:29:48 -0500 Content-Disposition: inline In-Reply-To: <4ED39FE2.7010609@draigBrady.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Mon, Nov 28, 2011 at 02:51:14PM +0000, P=E1draig Brady wrote: > It would be better to indicate ENOSPC _before_ copying a (potentially= large) > file to a (potentially slow) device. If the implementation complexity > and side effects of doing this are sufficiently small, then it's wort= h > 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 manure in a 5 pound bag, that can be caught very readily without needing to use fallocate(2). Regards, - 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