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

Re: root fs type in fstab



Stephen writes:
> > It doesn't do any detection of the last sequence number in this case.
> 
> Right, but in this case we need to make sure that the old contents of
> the journal cannot ever be mistaken for a valid transaction.  The
> classic case is a crash during boot, leaving a freshly-initialised
> journal full of data --- simply reinitialising the journal won't
> invalidate the data which is already there, so you end up risking an
> extra journal replay after fsck has tidied up.

What I've done for now is to initialize the sequence number to a random
value.  This should be (1 - journal_blocks/3/2^32)*100% safe.  IMHO, it
would be fairly dangerous to zero the journal in the middle of e2fsck,
in case the inode is corrupt or something - we would be scribbling many
MB of zeros all over the disk.

Is journal sequence number wrapping handled OK?  I _think_ it is, because
of the addition of the ti_ge() macros, but I haven't checked.

Cheers, Andreas
-- 
Andreas Dilger  \ "If a man ate a pound of pasta and a pound of antipasto,
                 \  would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/               -- Dogbert





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