Re: writing file to disk: not as easy as it looks

From: Folkert van Heusden
Date: Tue Dec 02 2008 - 14:11:59 EST

> > If disk looses data after acknowledging the write, all hope is lost.
> > Else I expect filesystem to preserve data I successfully synced.
> > (In the b-tree split failed case I'd expect transaction commit to
> > fail because new data could not be weitten; at that point
> > disk+journal should still contain all the data needed for
> > recovery of synced/old files, right?)
> Not necessarily. For filesystems that do logical journalling (i.e.,
> xfs, jfs, et. al), the only thing written in the journal is the
> logical change (i.e., "new dir entry 'file_that_causes_the_node_split'").

> The transaction commits *first*, and then the filesystem tries to
> write update the filesystem with the change, and it's only then that
> the write fails. Data can very easily get lost.

> Even for ext3/ext4 which is doing physical journalling, it's still the

So do I understand this right that ext3/4 are more robust?

Folkert van Heusden

MultiTail is a versatile tool for watching logfiles and output of
commands. Filtering, coloring, merging, diff-view, etc.
Phone: +31-6-41278122, PGP-key: 1F28D8AE,
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at