Subject: Re: FFS journal
To: Kirill Kuvaldin <kirill.kuvaldin@gmail.com>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: tech-kern
Date: 07/05/2006 13:23:28
On Wed, Jul 05, 2006 at 11:15:20AM +0400, Kirill Kuvaldin wrote:
> [...]
> >
> >Other quesitons:
> >  * what's the procedure upon system startup, possibly after a crash?
> 
> The recovery is done via replaying all journal entries that were not
> marked as *completed*. Thus, journal API probably shall be extended
> with function (journal_replay()) for doing this.
> Its call shall be hooked into ufs_mount() function.

No, I think this should be in fsck. When the system boots fsck is run
before filesystems are mounted read/write. There shouldn't be anything
in the kernel writing to the filesystem before we tell the system to mount it
read/write, even for recovering the journal. And if for whatever reason the
journal can't be recovered we certainly want fsck to check this filesystem
(or just fail, and stop the boot process).

-- 
Manuel Bouyer, LIP6, Universite Paris VI.           Manuel.Bouyer@lip6.fr
     NetBSD: 26 ans d'experience feront toujours la difference
--