ecashin@coraid.com [PATCH] aoe: fail IO on disk errors ChangeSet 1.2038, 2005/03/09 10:21:33-08:00, ecashin@coraid.com [PATCH] aoe: fail IO on disk errors This patch makes disk errors fail the IO instead of getting logged and ignored. Fail IO on disk errors Signed-off-by: Ed L. Cashin Signed-off-by: Greg Kroah-Hartman drivers/block/aoe/aoecmd.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff -Nru a/drivers/block/aoe/aoecmd.c b/drivers/block/aoe/aoecmd.c --- a/drivers/block/aoe/aoecmd.c 2005-03-09 16:15:53 -08:00 +++ b/drivers/block/aoe/aoecmd.c 2005-03-09 16:15:53 -08:00 @@ -416,7 +416,9 @@ if (ahin->cmdstat & 0xa9) { /* these bits cleared on success */ printk(KERN_CRIT "aoe: aoecmd_ata_rsp: ata error cmd=%2.2Xh " - "stat=%2.2Xh\n", ahout->cmdstat, ahin->cmdstat); + "stat=%2.2Xh from e%ld.%ld\n", + ahout->cmdstat, ahin->cmdstat, + d->aoemajor, d->aoeminor); if (buf) buf->flags |= BUFFL_FAIL; } else { @@ -458,8 +460,8 @@ if (buf) { buf->nframesout -= 1; if (buf->nframesout == 0 && buf->resid == 0) { - n = !(buf->flags & BUFFL_FAIL); - bio_endio(buf->bio, buf->bio->bi_size, 0); + n = (buf->flags & BUFFL_FAIL) ? -EIO : 0; + bio_endio(buf->bio, buf->bio->bi_size, n); mempool_free(buf, d->bufpool); } }