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

From: Chris Friesen
Date: Tue Dec 02 2008 - 12:23:34 EST


Theodore Tso wrote:

Even for ext3/ext4 which is doing physical journalling, it's still the
case that the journal commits first, and it's only later when the
write happens that we write out the change. If the disk fails some of
the writes, it's possible to lose data, especially if the two blocks
involved in the node split are far apart, and the write to the
existing old btree block fails.

Yikes. I was under the impression that once the journal hit the platter then the data were safe (barring media corruption).

It seems like the more I learn about filesystems, the more failure modes there are and the fewer guarantees can be made. It's amazing that things work as well as they do...

Chris
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/