Group: linux.gentoo.user
From: Vaeth
Date: Friday, February 15, 2008 1:50 PM
Subject: Re: [gentoo-user] Ext4 status - Alternative to ext2/3 for gentoo portage and more

On Fri, 15 Feb 2008, Uwe Thiem wrote:

> Second, no journalled filesystem in the whole wide world can prevent
> occurences of inconsisteny in case of a power cut. None, try as they
> might.

This is correct.

> If the journal change still resides in the
> harddrive cache while your power cut occurs, boooom - inconsistency.

But this isn't the reason. Harddrives know a "flush" command which -
when properly used by the filesystem (and I guess reiserfs and ext3
use it properly) - forces the journal to be written before the actual
change in the main file system occurs. Whence, no loss of consistency.
[Of course, there are some harddrives which ignore the "flush", but
this should be counted as faulty hardware. Of course, on broken
hardware, no software can work as it should.]

If the power loss occurs *during* flushing the journal (and thus
the journal might contain nonsense) the filesystem might still use
a checksum over the journal to detect this and thus preserves
consistency (although I don't know whether any existing filesystem
currently does this).

The real problem is that during power cut the harddrive might be
writing complete nonsense *somewhere* - this is not related with
any caching, and no software can safe you from this problem
(and what is even worse is that there is no way to detect it...)
--
gentoo-user@lists.gentoo.org mailing list