public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Mike Snitzer <snitzer@redhat.com>
To: James Bottomley <James.Bottomley@suse.de>
Cc: linux-scsi@vger.kernel.org, agk@redhat.com, jaxboe@fusionio.com,
	Hannes Reinecke <hare@suse.de>,
	michaelc@cs.wisc.edu, Mike Snitzer <snitzer@redhat.com>
Subject: [PATCH v3 2/3] dm mpath: propagate target errors immediately
Date: Fri, 14 Jan 2011 10:58:55 -0500	[thread overview]
Message-ID: <1295020736-27699-3-git-send-email-snitzer@redhat.com> (raw)
In-Reply-To: <1295020736-27699-1-git-send-email-snitzer@redhat.com>

DM now has more information about the nature of the underlying storage
failure.  Path failure is avoided if a request failed due to a target
error.  Instead the target error is immediately passed up the stack.

Discard requests that fail due to non-target errors may now be retried.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Acked-by: Hannes Reinecke <hare@suse.de>
---
 drivers/md/dm-mpath.c |   11 +----------
 1 files changed, 1 insertions(+), 10 deletions(-)

diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
index b82d288..532b845 100644
--- a/drivers/md/dm-mpath.c
+++ b/drivers/md/dm-mpath.c
@@ -1283,16 +1283,7 @@ static int do_end_io(struct multipath *m, struct request *clone,
 	if (!error && !clone->errors)
 		return 0;	/* I/O complete */
 
-	if (error == -EOPNOTSUPP)
-		return error;
-
-	if (clone->cmd_flags & REQ_DISCARD)
-		/*
-		 * Pass all discard request failures up.
-		 * FIXME: only fail_path if the discard failed due to a
-		 * transport problem.  This requires precise understanding
-		 * of the underlying failure (e.g. the SCSI sense).
-		 */
+	if (error == -EOPNOTSUPP || error == -EREMOTEIO)
 		return error;
 
 	if (mpio->pgpath)
-- 
1.7.3.4


  parent reply	other threads:[~2011-01-14 15:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-14 15:58 [PATCH v3 0/3] differentiate between I/O errors Mike Snitzer
2011-01-14 15:58 ` [PATCH v3 1/3] scsi: Detailed " Mike Snitzer
2011-01-14 16:10   ` Jonathan McDowell
2011-01-14 17:16     ` Mike Snitzer
2011-01-17 15:52       ` Hannes Reinecke
2011-01-17 18:20         ` Mike Snitzer
2011-01-14 15:58 ` Mike Snitzer [this message]
2011-01-14 15:58 ` [PATCH v3 3/3] block: improve detail in I/O error messages Mike Snitzer

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=1295020736-27699-3-git-send-email-snitzer@redhat.com \
    --to=snitzer@redhat.com \
    --cc=James.Bottomley@suse.de \
    --cc=agk@redhat.com \
    --cc=hare@suse.de \
    --cc=jaxboe@fusionio.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=michaelc@cs.wisc.edu \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox