Re: mode data=journal in ext3. Is it safe to use?
From: Oleg Drokin
Date: Fri Jun 18 2004 - 05:28:57 EST
Hello!
On Fri, Jun 18, 2004 at 11:41:23AM +0200, Helge Hafting wrote:
> >If you can reproduce a garbage in files in ordered journal mode, that
> >would be a
> >bug that should be fixed then.
> Hard to _produce_, but consider:
> 1. Write data to an existing file
> 2. Sync metadata
> 3. data is forced out because of ordered mode, a powerout crash happens
> in the middle of this. The file now has a block with a mix of new
> and old,
Well, this is not much worse than having two blocks, one from old file
and one from new after a crash.
> it may even be unreadable due to a bad sector checksum.
Well, in data journaled mode you may get unreadable journal, is this much
better? (Also original question was about CF flash media, so no bad sector
problems I presume).
> With data journalling you either get the old data (because the crash
> happened
> during a write to the journal) or new data (crash happened during data
> write,
Well, while with data journaling mode your granularity is one block,
with data ordered it is one sector.
> the data is restored from the good copy in the journal.)
Bye,
Oleg
-
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/