summaryrefslogtreecommitdiff
path: root/drivers/md/dm.h
diff options
context:
space:
mode:
authorMike Snitzer <snitzer@redhat.com>2014-12-19 00:26:47 +0300
committerMike Snitzer <snitzer@redhat.com>2015-02-09 21:06:47 +0300
commit65803c2059832fb99b992728157f7924c2e42d4b (patch)
tree02ba090a7ff05070a3bb999708ceee67dadd0a10 /drivers/md/dm.h
parente5863d9ad754926e7d3f38b43ac8bd48ef73b097 (diff)
downloadlinux-65803c2059832fb99b992728157f7924c2e42d4b.tar.xz
dm table: train hybrid target type detection to select blk-mq if appropriate
Otherwise replacing the multipath target with the error target fails: device-mapper: ioctl: can't change device type after initial table load. The error target was mistakenly considered to be target type DM_TYPE_REQUEST_BASED rather than DM_TYPE_MQ_REQUEST_BASED even if the target it was to replace was of type DM_TYPE_MQ_REQUEST_BASED. Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md/dm.h')
-rw-r--r--drivers/md/dm.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/md/dm.h b/drivers/md/dm.h
index 84d79784b866..59f53e79db82 100644
--- a/drivers/md/dm.h
+++ b/drivers/md/dm.h
@@ -101,7 +101,8 @@ int dm_setup_md_queue(struct mapped_device *md);
/*
* To check whether the target type is request-based or not (bio-based).
*/
-#define dm_target_request_based(t) ((t)->type->map_rq != NULL)
+#define dm_target_request_based(t) (((t)->type->map_rq != NULL) || \
+ ((t)->type->clone_and_map_rq != NULL))
/*
* To check whether the target type is a hybrid (capable of being