* [PATCH block-2.6] aoe: fail IO on disk errors
@ 2005-01-25 15:11 Ed L Cashin
2005-02-01 7:53 ` Greg KH
0 siblings, 1 reply; 2+ messages in thread
From: Ed L Cashin @ 2005-01-25 15:11 UTC (permalink / raw)
To: Greg K-H; +Cc: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 155 bytes --]
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 <ecashin@coraid.com>
[-- Attachment #2: diff-91-block --]
[-- Type: text/plain, Size: 1012 bytes --]
diff -uprN block-2.6-aa/drivers/block/aoe/aoecmd.c block-2.6-bb/drivers/block/aoe/aoecmd.c
--- block-2.6-aa/drivers/block/aoe/aoecmd.c 2005-01-25 08:07:33.000000000 -0500
+++ block-2.6-bb/drivers/block/aoe/aoecmd.c 2005-01-25 10:00:45.000000000 -0500
@@ -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);
}
}
[-- Attachment #3: Type: text/plain, Size: 41 bytes --]
--
Ed L Cashin <ecashin@coraid.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-02-01 7:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-25 15:11 [PATCH block-2.6] aoe: fail IO on disk errors Ed L Cashin
2005-02-01 7:53 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox