Commit 1ca66d6a authored by Bart Van Assche's avatar Bart Van Assche Committed by Greg Kroah-Hartman

dm table: an 'all_blk_mq' table must be loaded for a blk-mq DM device

commit 301fc3f5 upstream.

When dm_table_set_type() is used by a target to establish a DM table's
type (e.g. DM_TYPE_MQ_REQUEST_BASED in the case of DM multipath) the
DM core must go on to verify that the devices in the table are
compatible with the established type.

Fixes: e83068a5 ("dm mpath: add optional "queue_mode" feature")
Signed-off-by: default avatarBart Van Assche <bart.vanassche@sandisk.com>
Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d948d3b1
...@@ -981,6 +981,11 @@ static int dm_table_determine_type(struct dm_table *t) ...@@ -981,6 +981,11 @@ static int dm_table_determine_type(struct dm_table *t)
t->all_blk_mq = true; t->all_blk_mq = true;
} }
if (t->type == DM_TYPE_MQ_REQUEST_BASED && !t->all_blk_mq) {
DMERR("table load rejected: all devices are not blk-mq request-stackable");
return -EINVAL;
}
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment