Skip to contentSkip to conversation

aoe: fail IO on disk errors

PATCH Applied Ed L Cashin 2 participants 2 messages Jan 25, 2005 – Feb 1, 2005

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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

drivers/block/aoe/aoecmd.c +5 -3
diff -uprN block-2.6-aa/drivers/block/aoe/aoecmd.c block-2.6-bb/drivers/block/aoe/aoecmd.c
@@ -416,7 +416,9 @@ aoecmd_ata_rsp(struct sk_buff *skb)
 
 	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 @@ aoecmd_ata_rsp(struct sk_buff *skb)
 	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);
 		}
 	}
Signature · 2 lines
-- 
  Ed L Cashin <[email protected]>
Applied
#1 lore raw
Quoted 6 lines · Ed L Cashin

This patch makes disk errors fail the IO instead of getting logged and ignored.

Fail IO on disk errors

Applied, thanks.

greg k-h