On 6/25/25 3:15 PM, Christoph Hellwig wrote: > On Wed, Jun 25, 2025 at 02:59:06PM +0900, Damien Le Moal wrote: >> Any zoned DM target that requires zone append emulation will use the >> block layer zone write plugging. In such case, DM target drivers must >> not split BIOs using dm_accept_partial_bio() as doing so can potentially >> lead to deadlocks with queue freeze operations. Regular write operations >> used to emulate zone append operations also cannot be split by the >> target driver as that would result in an invalid writen sector value >> return using the BIO sector. >> >> In order for zoned DM target drivers to avoid such incorrect BIO >> splitting, we must ensure that large BIOs are split before being passed >> to the map() function of the target, thus guaranteeing that the >> limits for the mapped device are not exceeded. >> >> dm-crypt and dm-flakey are the only target drivers supporting zoned >> devices and using dm_accept_partial_bio(). > > Is there any good way to catch usage dm_accept_partial_bio on zone > devices so that issues like this don't get reintroduced later?
patch 4 does that. Though with the heavy BUG_ON() hammer. That can be cleaned up later though. -- Damien Le Moal Western Digital Research