Re: O_TRUNC problem on a full filesystem

2001-05-25 Thread Stephen C. Tweedie
Hi, On Fri, May 25, 2001 at 10:24:49AM +1000, Andrew Morton wrote: > For example, when we miss the goal block we search forward > up to 63 blocks for a *single* free block, and use that. > Perhaps we shouldn't? The reasoning here is that it's much cheaper to go to a single block which is very n

Re: O_TRUNC problem on a full filesystem

2001-05-24 Thread Andrew Morton
Andreas Dilger wrote: > > Andrew writes: > > "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 r

Re: O_TRUNC problem on a full filesystem

2001-05-24 Thread Andreas Dilger
Stephen writes: > On Thu, May 24, 2001 at 11:24:10AM -0600, Andreas Dilger wrote: > > How have you done the ext3 preallocation code? > > Preallocation is currently disabled in ext3. Eventually I'll probably > get it going by adding a journal prepare-commit callback to allow the > filesystem to

Re: O_TRUNC problem on a full filesystem

2001-05-24 Thread Stephen C. Tweedie
Hi, On Thu, May 24, 2001 at 11:24:10AM -0600, Andreas Dilger wrote: > How have you done the ext3 preallocation code? Preallocation is currently disabled in ext3. Eventually I'll probably get it going by adding a journal prepare-commit callback to allow the filesystem to flush preallocation be

Re: O_TRUNC problem on a full filesystem

2001-05-24 Thread Andreas Dilger
Andrew writes: > "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 alloca

Re: O_TRUNC problem on a full filesystem

2001-05-24 Thread Andrew Morton
"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 >

Re: O_TRUNC problem on a full filesystem

2001-05-24 Thread Stephen C. Tweedie
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 prea

Re: O_TRUNC problem on a full filesystem

2001-05-23 Thread Andrew Morton
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

OT: O_TRUNC problem on a full filesystem

2001-05-23 Thread Helge Hafting
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: Not a bug. > If the filesystem is full, obviously, I can't write anything to that any > longer. But if I open a file with O_TRUNC flag set, the file will be t

O_TRUNC problem on a full filesystem

2001-05-22 Thread Manas Garg
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: If the filesystem is full, obviously, I can't write anything to that any longer. But if I open a file with O_TRUNC flag set, the file will be truncated. Any program that opens a file