From 53d94f83fd05b5a36fdfd66eb0f1985590f00811 Mon Sep 17 00:00:00 2001 From: Mike Snitzer Date: Thu, 12 Aug 2010 04:14:32 +0100 Subject: [PATCH] --- yaml --- r: 209175 b: refs/heads/master c: 959eb4e5592cc0b0b07db0ca30d2b1efd790020f h: refs/heads/master i: 209173: e282ccb6e88a7ebef3e2c0bab7893ca37348462b 209171: af4cd78b6a816ab02261523d9be172cf7c2b1f18 209167: 8151a196c21a722bdb557c2a7a68f1bd40da03eb v: v3 --- [refs] | 2 +- trunk/drivers/md/dm-mpath.c | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index abc44a4afe31..5f9254dd2962 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7b76ec11fec40203836b488496d2df082d5b2022 +refs/heads/master: 959eb4e5592cc0b0b07db0ca30d2b1efd790020f diff --git a/trunk/drivers/md/dm-mpath.c b/trunk/drivers/md/dm-mpath.c index da2223aa727f..487ecda90ad4 100644 --- a/trunk/drivers/md/dm-mpath.c +++ b/trunk/drivers/md/dm-mpath.c @@ -893,6 +893,7 @@ static int multipath_ctr(struct dm_target *ti, unsigned int argc, } ti->num_flush_requests = 1; + ti->num_discard_requests = 1; return 0; @@ -1272,6 +1273,15 @@ static int do_end_io(struct multipath *m, struct request *clone, 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). + */ + return error; + if (mpio->pgpath) fail_path(mpio->pgpath);