ATA write cache

Radim Kolar hsn at netmag.cz
Wed Jun 2 17:00:14 CEST 2004


zda se ze to neni moc dobry napad. V linuxu je defaultne off.

=On May 20, 2004, at 4:15 PM, Mikhail Teterin wrote:
=> =No. Unlike SCSI disks, ATA disks will toss their write-cache on a
=> =reset. When the system crashes and the BIOS starts rebooting, guess
=> =what it issues to the ATA disks? Yep, a reset.
=
=I checked with my BIOS source, and I got this wrong. After a crash, the
=BIOS is usually entered as a result of the crash-code (panic(), in the
=case of *BSD) invoking a hard reset by writing to the reset bit of I/O
=port 92. This causes a reset of the hardware, which includes the PCI
=bus and the ATA disks as well as the CPU.

=> So with ATA write-cache =enabled, your filesystem is likely to be
=> toast after a crash, as well =as after a power failure.
=>
=> Is not this only of concern if the power is restored and the BIOS
=> resets the disks _before_ they flush their write caches? I'd expect
=> them to do that (the flushing) within seconds anyway, no?

=Yes, if the disks manage to win the race by flushing their write cache
=before the hard reset is issued by the crash code, then everything is
=fine. [...] I think the panic code quite soon after getting control,
=and the disks flush their write cache rather lazily, rather than
=eagerly.



More information about the Users-l mailing list