diff options
author | Chris Metcalf <cmetcalf@tilera.com> | 2010-08-13 19:59:15 -0400 |
---|---|---|
committer | Chris Metcalf <cmetcalf@tilera.com> | 2010-08-13 19:59:15 -0400 |
commit | 7d72e6fa56c4100b9669efe0044f77ed9eb785a1 (patch) | |
tree | 5e90bf4969809a1ab20b97432b85be20ccfaa1f4 /drivers/md/dm-mpath.c | |
parent | ba00376b0b13f234d839541a7b36a5bf5c2a4036 (diff) | |
parent | 2be1f3a73dd02e38e181cf5abacb3d45a6a2d6b8 (diff) |
Merge branch 'master' into for-linus
Diffstat (limited to 'drivers/md/dm-mpath.c')
-rw-r--r-- | drivers/md/dm-mpath.c | 11 |
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 | ||