Subject: Re: softdep?
To: Dave Huang <khym@bga.com>
From: Mason Loring Bliss <mason@acheron.middleboro.ma.us>
List: current-users
Date: 03/26/1999 07:46:53
On Thu, Mar 25, 1999 at 02:53:40PM -0600, Dave Huang wrote:

> I thought LFS was a journalled filesystem?

The idea of a journalled filesystem, as I understand it, is that you never
leave the filesystem in an inconsistent state, even when you have your power
drop out in the middle of a write.

Writes go like this, more or less:

Write something to the "journal" on the disk saying "I'm going to write some
data over here." Then, write the data. Then, add another entry to the journal
saying "Okay. I wrote that successfully." If the power drops out while you're
writing the "I'm about to..." part, you don't have the "okay" part, and you
ignore it, if it's incomplete. If power drops while you're writing the data
itself, you still don't have the "okay" bit, and thus ignore the entry. I'm
not sure what happens when the last piece is written, but it's probably safe
to assume that if the "okay" bit is incomplete, you can ignore that entry.

I could be wrong about some of this, but hopefully someone who knows more
will correct this if and as needed.

Anyway, my assumption was at one point that soft updates provided this same
functionality, but I've been told otherwise, so I'm not sure *what* to think
about soft updates at the moment. More reading is in order, I guess. Luckily,
I know there's a lot of random stuff on soft updates that comes up in, say,
an Alta Vista search. <shrug>

The big difference with a log-structured filesystem appears to be that the
filesystem *can* be left in an inconsistent state - it's just that the in-
consistency happens in one well-defined region on the disk.

-- 
Mason Loring Bliss             ((  "In the drowsy dark cave of the mind dreams
mason@acheron.middleboro.ma.us  ))  build  their nest  with fragments  dropped
http://acheron.ne.mediaone.net ((   from day's caravan." - Rabindranath Tagore