On 7/21/23 03:18, Bart Van Assche wrote: > On 7/19/23 16:07, Damien Le Moal wrote: >> Not really. I was not thinking about passthrough requests but rather write >> syscalls to /dev/sdX by applications. sd_setup_read_write_cmnd() is used for >> these too. After all, /dev/sdX *is* a file system too, albeit the simplest possible. > > How about introducing a new request flag (REQ_*) such that f2fs can disable > zone locking while it remains enabled for all other users (BTRFS and direct > I/O)? That could be a safer approach. Still a little worried about any DM used between the FS and the device though. The DMs that support zoned devices should be OK but only under the assumption that the bio issuer (f2fs) guarantees that writes to the same zone are not issued in parallel when that REQ_NO_ZONE_WRITE (or whatever the name) is used. This flag definition will need to have a big fat warning mentioning this constraint, that is, make it clear that it is not a replacement for zone append (in which case we do not write lock zones and do not care about ordering). -- Damien Le Moal Western Digital Research