]> git.baikalelectronics.ru Git - kernel.git/commit
dm table: fix zoned iterate_devices based device capability checks
authorJeffle Xu <jefflexu@linux.alibaba.com>
Tue, 9 Feb 2021 03:46:38 +0000 (22:46 -0500)
committerMike Snitzer <snitzer@redhat.com>
Tue, 9 Feb 2021 13:47:43 +0000 (08:47 -0500)
commit9fe488047f9e1982fe2050de7bca2b631775278a
treef76f8054dd0a11bef3443b2f56092694b401a6f0
parente344a2659b19ba757a7bd2e23662980844a112d1
dm table: fix zoned iterate_devices based device capability checks

Fix dm_table_supports_zoned_model() and invert logic of both
iterate_devices_callout_fn so that all devices' zoned capabilities are
properly checked.

Add one more parameter to dm_table_any_dev_attr(), which is actually
used as the @data parameter of iterate_devices_callout_fn, so that
dm_table_matches_zone_sectors() can be replaced by
dm_table_any_dev_attr().

Fixes: 406cd9f5a6726 ("dm table: add zoned block devices validation")
Cc: stable@vger.kernel.org
Signed-off-by: Jeffle Xu <jefflexu@linux.alibaba.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-table.c