dm table: do not allow request-based DM to stack on partitions
authorMike Snitzer <snitzer@redhat.com>
Tue, 5 Nov 2019 15:43:44 +0000 (10:43 -0500)
committerMike Snitzer <snitzer@redhat.com>
Tue, 5 Nov 2019 16:22:52 +0000 (11:22 -0500)
commit6ba01df72b4b63a26b4977790f58d8f775d2992c
treeabe5ee5f34277e7b233873e44bb9c663dfa310e3
parenta99d8080aaf358d5d23581244e5da23b35e340b9
dm table: do not allow request-based DM to stack on partitions

Partitioned request-based devices cannot be used as underlying devices
for request-based DM because no partition offsets are added to each
incoming request.  As such, until now, stacking on partitioned devices
would _always_ result in data corruption (e.g. wiping the partition
table, writing to other partitions, etc).  Fix this by disallowing
request-based stacking on partitions.

While at it, since all .request_fn support has been removed from block
core, remove legacy dm-table code that differentiated between blk-mq and
.request_fn request-based.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-table.c