On 6/25/25 2:33 AM, Damien Le Moal wrote:
+ /* + * Mapped devices that require zone append emulation will use the block + * layer zone write plugging. In such case, we must split any large BIO + * to the mapped device limits to avoid potential deadlocks with queue + * freeze operations. + */ + if (!dm_emulate_zone_append(md)) + return false; + return bio_needs_zone_write_plugging(bio) || bio_straddles_zones(bio);
Changing the dm_emulate_zone_append() call into a disk_need_zone_resources() call or a disk->zone_wplugs_hash test probably would make the intention of the if-statement more clear. Additionally, bio_needs_zone_write_plugging() already tests disk->zone_wplugs_hash. Isn't the dm_emulate_zone_append() call superfluous because of this? Thanks, Bart.