All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: linux-kernel@vger.kernel.org
Cc: ecashin@coraid.com
Subject: [PATCH] aoe: fail IO on disk errors
Date: Wed, 9 Mar 2005 16:19:23 -0800	[thread overview]
Message-ID: <11104139631637@kroah.com> (raw)
In-Reply-To: <1110413963858@kroah.com>

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 <ecashin@coraid.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


 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);
 		}
 	}


  reply	other threads:[~2005-03-10  3:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-10  0:18 [BK PATCH] AOE fixes for 2.6.11 Greg KH
2005-03-10  0:19 ` [PATCH] AoE warning on 64-bit archs Greg KH
2005-03-10  0:19   ` [PATCH] aoe: add documentation for udev users Greg KH
2005-03-10  0:19     ` [PATCH] aoe: update " Greg KH
2005-03-10  0:19       ` Greg KH [this message]
2005-03-10  0:19         ` [PATCH] aoe status.sh: handle sysfs not in /etc/mtab Greg KH
2005-03-10  0:19           ` [PATCH] aoe: drivers/block/aoe/aoechr.c cleanups Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=11104139631637@kroah.com \
    --to=greg@kroah.com \
    --cc=ecashin@coraid.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.