> I've asked about write caching before, and now I've got another
> If I've got write caching turned on, and the power goes out, do
> I face the possibility of silent metadata corruption?
> With ext2, the fsck would attempt to fix metadata problems on
> bootup; on the other hand, with xfs, if write caching resulted
> in a corrupted log, would the simple log replay that xfs does on
> mount perhaps fail to catch possible metadata problems?
Yes, and the same will be true for all write behind journalled filesystems,
if the log does not make it to disk when the driver says it has then in
theory a subsequent metadata write could make it out to the media. A crash
at this point would mean that part of a transaction had made it to disk,
but the rest which only existed in the disks internal cache would not.
I would expect reiserfs, ext3 and jfs would all have the same issue.
So I would not in general recommend write caching on a device, unless
you know enough about it to be satisfied that its cache makes it out
to disk on power down. Using the rotational power of the spindle to
generate power to move the head to a special track and flush the cache
is not unheard of for instance.
> Andrew Klaassen