Re: ext3 reservation question.

From: Chris Mason
Date: Thu Apr 22 2004 - 08:44:52 EST

On Wed, 2004-04-21 at 23:40, Andrew Morton wrote:

> The code I had at the time would reserve space in the filesystem
> correspnding to the worst-case occupancy based on file offset. When we
> actually hit ENOSPC in prepare_write(), we force writeout, which results in
> those worst-space reservations being collapsed into their _real_ space
> usage, which is much less. So writeout reclaims space in the filesystem
> and prepare_write() can proceed.
> That worked fine on ext2. But on ext3 we have a transaction open in
> prepare_write(), and the forced writeback will cause arbitrary amounts of
> unexpected metadata to be pumped into the current transaction, causing the
> fs to explode.
> At least, I _think_ that was the problem. All is hazy.
One possible solution is to allocate holes in the file during
prepare_write/commit_write, logging the metadata as you go. Then during
each commit fill any delayed allocations. You've still got a
potentially unbounded operation for logging the bitmaps, maybe solvable
through creative reservations.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at