From: Mike Snitzer <snitzer@redhat.com>
To: linux-scsi@vger.kernel.org
Cc: michaelc@cs.wisc.edu, dm-devel@redhat.com
Subject: Re: rq-based mpath failed path on SCSI target failure (malformed discard)
Date: Mon, 26 Jul 2010 11:00:00 -0400 [thread overview]
Message-ID: <20100726150000.GA31293@redhat.com> (raw)
In-Reply-To: <20100726133008.GA26771@redhat.com>
On Mon, Jul 26 2010 at 9:30am -0400,
Mike Snitzer <snitzer@redhat.com> wrote:
> Hi,
>
> I have been implementing discard support for the various DM targets. I
> have a LUN that requires a 4K alignment for all discard requests. I
> forced the issue (by misconfiguring the alignment such that discards
> would be misaligned). Multipath failed the path once the SCSI layer got
> the following error.
>
> My question: shouldn't mpath _not_ fail the path for "Illegal
> Request".. "Parameter value invalid"? The same request would fail on
> any path given that the failure is on the target side (rejecting the
> malformed discard request). Following setup is ext4 FS ontop of linear
> DM mapping (dm-2) ontop of request-based mpath mapping (dm-1):
>
> EXT4-fs (dm-2): mounted filesystem with ordered data mode
> sd 3:0:0:0: [sda] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
> sd 3:0:0:0: [sda] Sense Key : Illegal Request [current]
> Info fld=0x0
> sd 3:0:0:0: [sda] Add. Sense: Parameter value invalid
> sd 3:0:0:0: [sda] CDB: Write same(16): 93 08 00 00 00 00 00 00 45 82 00 00 03 00 00 00
> end_request: I/O error, dev sda, sector 17794
> device-mapper: multipath: Failing path 8:0.
The following patch sorts this out in multipath; special-cases discard
requests so that they don't enduce path failures:
diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
index ec2b43e..125c80f 100644
--- a/drivers/md/dm-mpath.c
+++ b/drivers/md/dm-mpath.c
@@ -1272,6 +1272,9 @@ static int do_end_io(struct multipath *m, struct request *clone,
if (error == -EOPNOTSUPP)
return error;
+ if (clone->cmd_flags & REQ_DISCARD)
+ return error; /* pass all discard request failures up */
+
if (mpio->pgpath)
fail_path(mpio->pgpath);
next prev parent reply other threads:[~2010-07-26 15:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-26 13:30 rq-based mpath failed path on SCSI target failure (malformed discard) Mike Snitzer
2010-07-26 15:00 ` Mike Snitzer [this message]
2010-07-26 16:23 ` Mike Christie
2010-07-26 17:40 ` 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=20100726150000.GA31293@redhat.com \
--to=snitzer@redhat.com \
--cc=dm-devel@redhat.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 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.