lkml.org 
[lkml]   [2001]   [May]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: O_TRUNC problem on a full filesystem
Manas Garg wrote:
>
> I am not sure if it should be classified as a bug, that's why I am calling it a
> problem. Here is the description:
>

It works fine with ext3 :)

That's because ext3 has per-file block preallocation
disabled.

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.

It's an arguable bug in ext2 and, as you've seen, the consequences
are bad. Your applications _are_ a little bit buggy,
because they can't assume that just because they
truncated the file, that space will remain available to
them.

Maybe someone would like to wade through screenfuls of icky
single-char identifiers and fix 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/

\
 
 \ /
  Last update: 2005-03-22 12:53    [W:0.163 / U:0.440 seconds]
©2003-2014 Jasper Spaans. Advertise on this site