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ádraig 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 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 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. >> >> That seems backwards to me; if fallocate fails, statfs(2) isn't going >> to reveal more space, is it? (modulo metadata issues, anyway?) > > 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@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html