Skip to content

Commit

Permalink
libata: Note that our cache flush code needs fixing up
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alan Cox authored and Jeff Garzik committed Oct 12, 2007
1 parent 50a9901 commit 4f34337
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/ata/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 4f34337

Please sign in to comment.