Subject: Re: Log area on-disk for the journal
To: Cary G. Gray <>
From: Bill Studenmund <>
List: tech-kern
Date: 10/23/2006 13:31:36
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Oct 23, 2006 at 07:43:45AM -0500, Cary G. Gray wrote:
> On Sun, 22 Oct 2006, Bill Studenmund wrote:
> ...
> >I think an inode is the best way for now. I don't think a jffs will have
> >the same problem LFS has as files stay put on ffs once allocated. While
> >the contents of the journal will change with time, its location won't.
> >Thus the only metadata updates would be m & a time. Assuming we desired
> >keeping them current (which I don't think we need to bother with).
> In order to avoid loss of the journal, you actually need to make sure tha=
> none of its metadata is rewritten at all--not the block containing its=20
> inode, nor any indirect blocks.  Failure during a rewrite of those leaves=
> you with a corrupted journal, which leaves you with a corrupted=20
> filesystem.  (My assumption here is that failure during a disk write can=
> leave a sector unreadable.)


ffs, and most other file systems, do not deal well with i/o errors on=20
meta-data blocks. This applies to all metadata blocks, not just the=20
journal. So the journal is doing nothing new...

> It is probably necessary to special case the journal inode timestamps,=20
> too, because writing to the log updates the journal inode timestamps,=20
> which produces a log write, which updates the timestamps...

No. NetBSD has a lazy timestamp behavior. Doing something that would
trigger an update (read or write) merely flags the node as needing an
X-time update. The update doesn't happen until something else flushes the
inode to disk.

Take care,


Content-Type: application/pgp-signature
Content-Disposition: inline

Version: GnuPG v1.4.3 (NetBSD)