]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitb770adc777ffd9ee3f7bb3513c3956f6b665b4c0
treeabe5ee5f34277e7b233873e44bb9c663dfa310e3
parent0af0731bd6559a20fbe86f8f0f8e49c6cf00fd42
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