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

Re: root fs type in fstab



Hi,

On Mon, Jan 29, 2001 at 12:03:29PM -0700, Andreas Dilger wrote:
> 
> I guess it depends on what you mean by "journal reset".  The e2fsck code
> does the journal recovery and it saves the last sequence number into
> the journal superblock, and sets s_start = 0.  When I was talking about
> "a journal reset", I meant that it is reinitializing all of the journal
> fields, like a brand new journal.  It doesn't do any detection of the
> last sequence number in this case, however.

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.

That's why the kernel reset code scans the journal for a known safe
sequence number to reset to.  Reinitialising it is not a safe option
unless you are also going to zero out the journal contents (which is
why the journal create code has to zero all of the blocks when the
journal is first created.)

Cheers,
 Stephen





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