diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/md/dm-rq.c | 12 | ||||
-rw-r--r-- | drivers/md/dm-target.c | 2 |
2 files changed, 6 insertions, 8 deletions
diff --git a/drivers/md/dm-rq.c b/drivers/md/dm-rq.c index 920e854caba9..a48130b90157 100644 --- a/drivers/md/dm-rq.c +++ b/drivers/md/dm-rq.c @@ -504,14 +504,12 @@ static int map_request(struct dm_rq_target_io *tio) /* The target wants to requeue the I/O after a delay */ dm_requeue_original_request(tio, true); break; - default: - if (r > 0) { - DMWARN("unimplemented target map return value: %d", r); - BUG(); - } - + case DM_MAPIO_KILL: /* The target wants to complete the I/O */ - dm_kill_unmapped_request(rq, r); + dm_kill_unmapped_request(rq, -EIO); + default: + DMWARN("unimplemented target map return value: %d", r); + BUG(); } return r; diff --git a/drivers/md/dm-target.c b/drivers/md/dm-target.c index 43d3445b121d..6264ff00dcf0 100644 --- a/drivers/md/dm-target.c +++ b/drivers/md/dm-target.c @@ -135,7 +135,7 @@ static int io_err_clone_and_map_rq(struct dm_target *ti, struct request *rq, union map_info *map_context, struct request **clone) { - return -EIO; + return DM_MAPIO_KILL; } static void io_err_release_clone_rq(struct request *clone) |