max journal size

Andreas Dilger adilger at
Thu Feb 16 21:30:53 UTC 2006

On Feb 16, 2006  10:23 +0100, Jure Pečar wrote:
> Default journal commit is something like 5 seconds, yes? My application
> - busy mail gateway - would imho bennefit from much larger journal commit
> times. As I understand, jounral commit is atomic operation - nothing else
> can do io to that filesystem at the same time.

This is incorrect.  While journal commit is atomic in the sense that it
will either all complete or all not complete (in case of failure) ext3/jbd
does not prevent new changes from being made while the transaction is
committing, unless the journal becomes totally full.

> With large journals and long time between commits, the commit itself
> takes a measureable amount of time. What happens if I pull the plug
> during such commit? How well tested area is this?

If you interrupt a committing transaction then all operations in that
transaction (which may be many for a large journal) will be lost (i.e.
rollback).  If your operations are synchronous then they will not
return until the journal has finished the commit (assuming you do not
have write-cache enabled on the disks).  This is fairly well tested,
as it happens all the time.

Cheers, Andreas
Andreas Dilger
Principal Software Engineer
Cluster File Systems, Inc.

More information about the Ext3-users mailing list