Messages in this thread | | | Subject | Re: ext3 reservation question. | From | Chris Mason <> | Date | Thu, 22 Apr 2004 09:43:07 -0400 |
| |
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/
| |