diff options
Diffstat (limited to 'drivers/md/dm-mpath.c')
-rw-r--r-- | drivers/md/dm-mpath.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c index da2223aa727f..487ecda90ad4 100644 --- a/drivers/md/dm-mpath.c +++ b/drivers/md/dm-mpath.c | |||
@@ -893,6 +893,7 @@ static int multipath_ctr(struct dm_target *ti, unsigned int argc, | |||
893 | } | 893 | } |
894 | 894 | ||
895 | ti->num_flush_requests = 1; | 895 | ti->num_flush_requests = 1; |
896 | ti->num_discard_requests = 1; | ||
896 | 897 | ||
897 | return 0; | 898 | return 0; |
898 | 899 | ||
@@ -1272,6 +1273,15 @@ static int do_end_io(struct multipath *m, struct request *clone, | |||
1272 | if (error == -EOPNOTSUPP) | 1273 | if (error == -EOPNOTSUPP) |
1273 | return error; | 1274 | return error; |
1274 | 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 | |||
1275 | if (mpio->pgpath) | 1285 | if (mpio->pgpath) |
1276 | fail_path(mpio->pgpath); | 1286 | fail_path(mpio->pgpath); |
1277 | 1287 | ||