On 5/23/25 18:30, Bart Van Assche wrote: > On 5/22/25 11:02 PM, Damien Le Moal wrote: >> On 5/22/25 19:08, Bart Van Assche wrote: > > [ ... ] >> Which DM driver is it ? Does that DM driver have some special work queue >> handling of BIO submissions ? Or does is simply remap the BIO and send it down >> to the underlying device in the initial submit_bio() context ? If it is the >> former case, then that DM driver must enable zone write plugging. If it is the >> latter, it should not need zone write plugging and ordering will be handled >> correctly throughout the submit_bio() context for the initial DM BIO, assuming >> that the submitter does indeed serialize write BIO submissions to a zone. I have >> not looked at f2fs code in ages. When I worked on it, there was a mutex to >> serialize write issuing to avoid reordering issues... > > It is the dm-default-key driver, a driver about which everyone > (including the authors of that driver) agree that it should disappear. > Unfortunately the functionality provided by that driver has not yet been > integrated in the upstream kernel (encrypt filesystem metadata). > > How that driver (dm-default-key) works is very similar to how dm-crypt > works. I think that the most important difference is that dm-crypt > requests encryption for all bios while dm-default-key only sets an > encryption key for a subset of the bios it processes. > > The source code of that driver is available here: > https://android.googlesource.com/kernel/common/+/refs/heads/android16-6.12/drivers/md/dm-default-key.c Well, this is an out of tree driver. Not touching this. Unless you can reproduce the issue with dm-crypt (or any other DM target that is upstream), I will not even try to debug this. Note that our internal test suite runs *lots* of different zoned devices (SMR HDD, ZNS SSDs, nullblk, tcmu-runner ZBC device, scsi_debug, qemu nvme zns device) against *lots* of configurations for file systems (xfs, btrfs, zonefs) and DM targets (dm-crypt, dm-linear) and we have not seen any reordering issue, We run this test suite weekly against RC kernels and for-next branch. -- Damien Le Moal Western Digital Research