[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Ordered Mode vs Journaled Mode



Hi,

On Tue, Oct 02, 2001 at 02:55:02PM -0700, Mike Fedyk wrote:
 
> I've been wondering exactly what you gain by using journaled mode over
> ordered mode.

The main benefit is that small synchronous writes (eg. from NFS
servers or mail spools) can be written sequentially to the log if you
use journaled data mode, whereas ordered mode would require seeks
between the data and the journal.

There are also some consistency questions: if you are modifying a
file's existing contents in-place (as opposed to extending a file),
then data-journaling keeps the data and metadata in sync, so the mtime
timestamp is always entirely reliable.  With ordered data, it is
possible for a crash to leave the data modified but have the mtime not
updated.

Finally, journalled data mode makes an absolute ordering guarantee
about data writes: overwrites of existing data may result in the
writes being made out-of-order with ordered mode, but journaled mode
always preserves the write order.

If you are extending a file (or overwriting it by truncating it and
rewriting it), then ordered and journaled mode have exactly the same
recovery semantics: only the performance may be different.

> Are there any known cases where journaled mode could recover where ordered
> mode wouldn't?

No, other than the ordering guarantees I've just described.

Cheers,
 Stephen





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]