Re: [EXT3/JBD] Periodic journal flush not enough?

From: Stephen C. Tweedie
Date: Mon Mar 29 2004 - 13:58:08 EST


Hi,

On Fri, 2004-03-26 at 23:48, Andrew Morton wrote:
> Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> wrote:
> >
> > I've encountered a problem with the journal flush timer. The problem
> > is that when a filesystem is short on space, relying on a timer-based
> > flushing mechanism is no longer adequate. For example, on my P4 2GHz
> > I can trigger an ENOSPC error by doing
> >
> > while :; do echo test > a; [ -s a ] || break; rm a; done; echo Out of space
> >
> > on an ext3 file system with 12Mb of free space using the usual 5s
> > journal flush timer.
>
> I cannot reproduce this. Please send more details. Journalling mode,
> kernel version, etc.

Sounds like it's due to the "b_committed_data" avoidance code. Ext3
cannot immediately reuse disk space after a delete, because of lazy
writeback --- until the final writeback of the delete hits disk, we have
to be able to undo it. And because in non-data-journaled modes we allow
new disk writes to hit disk before a transaction commit, that means we
can't reuse deleted blocks until after they are committed.

I've never seen it reported as a problem outside of artificial test
scenarios, but if it is something we need to address, Andreas Dilger's
patch looks good.

Cheers,
Stephen


-
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/