lkml.org 
[lkml]   [2004]   [Apr]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: ext3 reservation question.
From
Date
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.

-chris

-
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 14:02    [W:1.188 / U:0.588 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site