aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-mpath.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/dm-mpath.c')
-rw-r--r--drivers/md/dm-mpath.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
index 826bce7343b3..487ecda90ad4 100644
--- a/drivers/md/dm-mpath.c
+++ b/drivers/md/dm-mpath.c
@@ -706,6 +706,7 @@ static struct priority_group *parse_priority_group(struct arg_set *as,
706 706
707 if (as->argc < nr_params) { 707 if (as->argc < nr_params) {
708 ti->error = "not enough path parameters"; 708 ti->error = "not enough path parameters";
709 r = -EINVAL;
709 goto bad; 710 goto bad;
710 } 711 }
711 712
@@ -892,6 +893,7 @@ static int multipath_ctr(struct dm_target *ti, unsigned int argc,
892 } 893 }
893 894
894 ti->num_flush_requests = 1; 895 ti->num_flush_requests = 1;
896 ti->num_discard_requests = 1;
895 897
896 return 0; 898 return 0;
897 899
@@ -1271,6 +1273,15 @@ static int do_end_io(struct multipath *m, struct request *clone,
1271 if (error == -EOPNOTSUPP) 1273 if (error == -EOPNOTSUPP)
1272 return error; 1274 return error;
1273 1275
1276 if (clone->cmd_flags & REQ_DISCARD)
1277 /*
1278 * Pass all discard request failures up.
1279 * FIXME: only fail_path if the discard failed due to a
1280 * transport problem. This requires precise understanding
1281 * of the underlying failure (e.g. the SCSI sense).
1282 */
1283 return error;
1284
1274 if (mpio->pgpath) 1285 if (mpio->pgpath)
1275 fail_path(mpio->pgpath); 1286 fail_path(mpio->pgpath);
1276 1287