On 6/26/25 01:34, Bart Van Assche wrote: > 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.
The comment is not clear enough ? > Additionally, bio_needs_zone_write_plugging() already tests > disk->zone_wplugs_hash. Isn't the dm_emulate_zone_append() call > superfluous because of this? Yes, I think it is. But I did try to minimize changes given that this is a fix which is not small already... I will do more testing and send follow-up cleanup patches. -- Damien Le Moal Western Digital Research