aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/md/dm-rq.c12
-rw-r--r--drivers/md/dm-target.c2
-rw-r--r--include/linux/device-mapper.h1
3 files changed, 7 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)
504 /* The target wants to requeue the I/O after a delay */ 504 /* The target wants to requeue the I/O after a delay */
505 dm_requeue_original_request(tio, true); 505 dm_requeue_original_request(tio, true);
506 break; 506 break;
507 default: 507 case DM_MAPIO_KILL:
508 if (r > 0) {
509 DMWARN("unimplemented target map return value: %d", r);
510 BUG();
511 }
512
513 /* The target wants to complete the I/O */ 508 /* The target wants to complete the I/O */
514 dm_kill_unmapped_request(rq, r); 509 dm_kill_unmapped_request(rq, -EIO);
510 default:
511 DMWARN("unimplemented target map return value: %d", r);
512 BUG();
515 } 513 }
516 514
517 return r; 515 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,
135 union map_info *map_context, 135 union map_info *map_context,
136 struct request **clone) 136 struct request **clone)
137{ 137{
138 return -EIO; 138 return DM_MAPIO_KILL;
139} 139}
140 140
141static void io_err_release_clone_rq(struct request *clone) 141static void io_err_release_clone_rq(struct request *clone)
diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h
index 5a02fc0ff311..78ad0624cdae 100644
--- a/include/linux/device-mapper.h
+++ b/include/linux/device-mapper.h
@@ -604,6 +604,7 @@ extern struct ratelimit_state dm_ratelimit_state;
604#define DM_MAPIO_REMAPPED 1 604#define DM_MAPIO_REMAPPED 1
605#define DM_MAPIO_REQUEUE DM_ENDIO_REQUEUE 605#define DM_MAPIO_REQUEUE DM_ENDIO_REQUEUE
606#define DM_MAPIO_DELAY_REQUEUE 3 606#define DM_MAPIO_DELAY_REQUEUE 3
607#define DM_MAPIO_KILL 4
607 608
608#define dm_sector_div64(x, y)( \ 609#define dm_sector_div64(x, y)( \
609{ \ 610{ \