Re: O_TRUNC problem on a full filesystem

From: Andrew Morton (andrewm@uow.edu.au)
Date: Thu May 24 2001 - 06:28:40 EST


"Stephen C. Tweedie" wrote:
>
> On Wed, May 23, 2001 at 07:55:48PM +1000, Andrew Morton wrote:
>
> > When you truncated your file, the blocks remained preallocated
> > on behalf of the file, and were hence considered "used". For
> > some reason, a subsequent attempt to allocate blocks for the
> > same file failed to use that file's preallocated blocks.
>
> Nope. ext2_truncate() calls ext2_discard_prealloc() to fix this up.
> Both 2.2 and 2.4 do this correctly.

But the problem goes away when you disable EXT2_PREALLOCATE.
I tested it.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu May 31 2001 - 21:00:15 EST