ANDROID: dm-table: allow zoned devices with non power-of-2 zone sizes

Allow dm to support zoned devices with non power-of-2(po2) zone sizes as
the block layer now supports it.

Signed-off-by: Pankaj Raghav <p.raghav@samsung.com>
Bug: 197782466
Bug: 269471019
Bug: 415836627
Link: https://lore.kernel.org/linux-block/20220923173618.6899-11-p.raghav@samsung.com/
Change-Id: I837811b17aacecc74fc2fd9d4009ad7e66917fb8
[ bvanassche: rebased on top of kernel android16-6.12 ]
Signed-off-by: Bart Van Assche <bvanassche@google.com>
This commit is contained in:
Pankaj Raghav
2022-09-23 19:36:15 +02:00
committed by Bart Van Assche
parent d6f0f66569
commit 355dfccf9d

View File

@@ -1640,8 +1640,8 @@ static int validate_hardware_zoned(struct dm_table *t, bool zoned,
return -EINVAL;
}
/* Check zone size validity and compatibility */
if (!zone_sectors || !is_power_of_2(zone_sectors))
/* Check zone size validity. */
if (!zone_sectors)
return -EINVAL;
if (dm_table_any_dev_attr(t, device_not_matches_zone_sectors, &zone_sectors)) {