Re: [RFC/RFT] [PATCH] EXT3: Retry allocation after journal commit

From: Andrew Morton
Date: Thu May 13 2004 - 21:54:44 EST


"Theodore Ts'o" <tytso@xxxxxxx> wrote:
>
> It is possible for block allocation to fail, even if there is space in
> the filesystem, because all of the free blocks were recently deleted and
> so could not be allocated until after the currently running transaction
> is committed. This can result in a very strange and surprising result
> where a system call such as a mkdir() will fail even though there is
> plenty of disk space apparently available.

I merged a little patch for this into post-2.6.6, but that only addresses
prepare_write().

I wonder if there's much value in having ext3_has_free_blocks()? We could
just retry three times even if the fs is really full?

I'd be inclined to pass a pointer to the `retry' counter into
ext3_should_retry_alloc() and implement the counting in there. It'll tidy
things up a bit and consolidates that piece of policy in a single place.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/