Background fsck

Matthew Dillon dillon at apollo.backplane.com
Mon Jan 19 11:20:37 PST 2004


:On Tue, Jan 20, 2004 at 02:22:01AM +0800, Xin LI wrote:
:> While it is possible to keep metadata consistency, it's *required* to write
:> the journal data synchronously, which will decrease performance. Without
:> doing the journal writes synchronously we are under the risk of losing
:> important metadata updates, and even lost the chance to bring the filesystem
:> into a consistency state.
:
:This is not true. The journal itself can be written async just like
:softdeps allows them to be written async. The important point is that
:both needs ordered writes.

    Exactly.  In fact, you do not even have to write the journal in sequence.
    You just add serial numbers to the journal blocks to detect if an out
    of order write occured within the journal (in case of a crash),
    then you do a single cache flush before you start writing out the
    random-seeked meta-data related to the journal you just wrote.

    Another big advantage that a journal has is that you can always write out
    more information to the journal then is actually needed to do the restore,
    making it more robust in the face of data ordering issues.

:hw.ata.wc is bad in multiple ways. it can distrupt anything, even a
:journaled filesystem.
:...
:Joerg

    Yes, and unfortunately it cannot be turned off without completely
    destroying performance.  That plus the whole-track-writes that nearly
    all IDE drives do these days can make for a lot of problems.

					-Matt
					Matthew Dillon 
					<dillon at xxxxxxxxxxxxx>





More information about the Kernel mailing list