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

Re: FS Q.




On Mon, 24 May 1999, Erez & Hadas Boym wrote:

> In that article the writer said that "Linux lacks journaling file
> system",
> Can anyone explain to me what that is ?

as far as i understand, a journaling file system writes each operation to
disk in two steps. first, it appends a log entry to a journaling file
(hence it's name), which sais what operation it _intends_ to perform.
Then, it performs the actual disk write operation. This way, if the system
crashes, there is no need to re-check all the file system. rather, it is
sufficient to check if the last operation was completed sucessfulyl or
not, and if not, to back-out (i.e. undo) that last operation. This means
your file system will never (hopefully...) be corrupt after improper
shutdown or crash, and that recovery time from a crash will be minimal.

note that the last operatin on disk still might be missing, and thus data
may_ be lost, but you're assured your file system is kept in a consistent
state at any given time.

i'd also assume that there are some tradeoffs between always writing the
data to disk, and keeping data in a write-behind cache. the journaling
file, however, must be always written directly to disk, not via any cache.
tihs is done more efficiently then with normal files, since this file may
be kept as a set of consecutive sectors on disk, reserved at the time of
formatting te file system.

now, it'd be nice if someone with proper formal knowlegde will confirm, or
disprove, my guesses.

guy