diff options
author | Christoph Hellwig <hch@lst.de> | 2017-04-26 09:40:39 +0200 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2017-05-02 00:19:03 +0200 |
commit | 412445acb6cad4cef026daae37c4765fb9942c60 (patch) | |
tree | 52b970ffec3a57e313473e67205729a696c743ec /drivers/md/dm-rq.c | |
parent | dm rq: change ->rq_end_io calling conventions (diff) | |
download | linux-412445acb6cad4cef026daae37c4765fb9942c60.tar.xz linux-412445acb6cad4cef026daae37c4765fb9942c60.zip |
dm: introduce a new DM_MAPIO_KILL return value
This untangles the DM_MAPIO_* values returned from ->clone_and_map_rq
from the error codes used by the block layer.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md/dm-rq.c')
-rw-r--r-- | drivers/md/dm-rq.c | 12 |
1 files changed, 5 insertions, 7 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; |