]> git.baikalelectronics.ru Git - kernel.git/commit
dm table: fix NVMe bio-based dm_table_determine_type() validation
authorMike Snitzer <snitzer@redhat.com>
Sat, 13 Jan 2018 19:33:30 +0000 (14:33 -0500)
committerMike Snitzer <snitzer@redhat.com>
Mon, 29 Jan 2018 18:44:56 +0000 (13:44 -0500)
commit9839a6a2c6bce5ebd5cf72c57dfa3e9e4ff7f568
treeb2384ffc90fa224beabb9878fc0c1bc5faa50cdf
parentc0135987b8c93362c4ca19c43d579b9a98d94a35
dm table: fix NVMe bio-based dm_table_determine_type() validation

The 'verify_rq_based:' code in dm_table_determine_type() was checking
all devices in the DM table rather than only checking the data devices.
Fix this by using the immutable target's iterate_devices method.

Also, tweak the block of dm_table_determine_type() code that decides
whether to upgrade from DM_TYPE_BIO_BASED to DM_TYPE_NVME_BIO_BASED so
that it makes sure the immutable_target doesn't support require
splitting IOs.

These changes have been verified to allow a "thin-pool" target whose
data device is an NVMe device to be upgraded to DM_TYPE_NVME_BIO_BASED.
Using the thin-pool in NVMe bio-based mode was verified to pass all the
device-mapper-test-suite's "thin-provisioning" tests.

Also verified that request-based DM multipath (with queue_mode "rq" and
"mq") works as expected using the 'mptest' harness.

Fixes: c7e6dab23 ("dm: introduce DM_TYPE_NVME_BIO_BASED")
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-table.c