On Thu, Jun 06, 2024 at 05:21:45PM +0900, Damien Le Moal wrote: > dm_revalidate_zones() is called from dm_set_zone_restrictions() when the > mapped device queue limits are not yet set. However, > dm_revalidate_zones() calls blk_revalidate_disk_zones() and this > function consults and modifies the mapped device queue limits. Thus, > currently, blk_revalidate_disk_zones() operates on limits that are not > yet initialized. > > Fix this by moving the call to dm_revalidate_zones() out of > dm_set_zone_restrictions() and into dm_table_set_restrictions() after > executing queue_limits_set(). > > To further cleanup dm_set_zones_restrictions(), the message about the > type of zone append (native or emulated) is also moved inside > dm_revalidate_zones(). > > Fixes: 1c0e720228ad ("dm: use queue_limits_set") > Signed-off-by: Damien Le Moal <dlemoal@xxxxxxxxxx> > Reviewed-by: Christoph Hellwig <hch@xxxxxx> > --- Reviewed-by: Niklas Cassel <cassel@xxxxxxxxxx>