libata: Note that our cache flush code needs fixing up
authorAlan Cox <alan@lxorguk.ukuu.org.uk>
Wed, 8 Aug 2007 13:30:31 +0000 (14:30 +0100)
committerJeff Garzik <jeff@garzik.org>
Fri, 12 Oct 2007 18:55:32 +0000 (14:55 -0400)
Remembered this while doing auditing and code review versus the specs

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/ata/libata-core.c

index d2141a04fff1f3da7e345e6d3541b406971feb1b..c0f3c78a2be04044767d5de417712a97138fcf80 100644 (file)
@@ -5906,6 +5906,10 @@ int ata_flush_cache(struct ata_device *dev)
        else
                cmd = ATA_CMD_FLUSH;
 
+       /* This is wrong. On a failed flush we get back the LBA of the lost
+          sector and we should (assuming it wasn't aborted as unknown) issue
+          a further flush command to continue the writeback until it 
+          does not error */
        err_mask = ata_do_simple_cmd(dev, cmd);
        if (err_mask) {
                ata_dev_printk(dev, KERN_ERR, "failed to flush cache\n");