On Fri, Nov 25, 2011 at 10:26:09AM +0000, P??draig Brady wrote: > I was wondering about adding fallocate() to cp, > where one of the benefits would be immediate indication of ENOSPC. > I'm now wondering though might fallocate() fail to allocate an > extent with ENOSPC, but there could be fragmented space available to write()? fallocate isn't guaranteed to allocate a single or even contiguous extents, it just allocate the given amount of space, and if the fs isn't too fragmented and the allocator not braindead it will be sufficiently contiguous. Also all Linux implementation may actually still fail a write later if extreme corner cases when btree splits or other metadata operations during unwritten extent conversions go over the space limit. -- 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