Commit 9b57b2cc authored by Jeffle Xu's avatar Jeffle Xu Committed by Cheng Jian
Browse files

dm table: fix zoned iterate_devices based device capability checks



stable inclusion
from linux-4.19.180
commit c6547dc1e3753382a58bc339a24ed4ef04b09dd3

--------------------------------

commit 24f6b603 upstream.

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: dd88d313 ("dm table: add zoned block devices validation")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarJeffle Xu <jefflexu@linux.alibaba.com>
Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
[jeffle: also convert no_sg_merge and partial completion check]
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: default avatarCheng Jian <cj.chengjian@huawei.com>
parent fe47cb9b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment