QMail and SoftUpdates
delphij at frontfree.net
Mon May 17 19:41:53 PDT 2004
On Mon, May 17, 2004 at 10:28:42PM -0400, Gary Corcoran wrote:
> Xin LI wrote:
> >doing fsync(), because with ATA hardware writing cache, the disk will
> >"cheat" the opearting system - Before the data actually goes to disk,
> >it tells that it is, and data is lost if crash occours here.
> Umm - shouldn't it be only if *power loss* occurs here?
> Even if the OS crashes, as long as power is supplied to the drive,
> its firmware should finish writing the data from its cache to the
> disk media, no? And therefore, as long as one has a stable power
> source, e.g. running off a UPS, there really isn't any great risk
> from on-drive write caches, is there?
I don't think so. Personally I think it is still danger if a crash
occours. Soft Updates rolls back buffers when necessary to guarantee
the on-disk state is in a "recoverable consistency". With a drive
cheating the operating system and reorder operating system write
operations, there is a potential risk that, when operating system
"thinks" that "this order is good and won't cause any problem", the
disk "thinks" that "that order is better and I write in that order",
and an "unexpected SoftUpdates inconsistency" occours. This is very
likely to cause data loss, or even more worse problem because there
might be wild pointers in i-nodes, or used blocks that are not marked
"used" in the cylgroup bitmap.
Xin LI <delphij frontfree net> http://www.delphij.net/
See complete headers for GPG key and other information.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-fs/attachments/20040518/efef421c/attachment.bin
More information about the freebsd-fs