On Sat, Sep 12, 2020 at 01:14:24PM +0900, Naohiro Aota wrote: > > For zoned devices you need to use bio_add_hw_page instead of so that all > > the hardware restrictions are applied. bio_add_hw_page asso gets the > > lenght limited passed as the last parameter so we won't need a separate > > check. > > I think we can't use it here. This bio is built for btrfs's logical space, > so the corresponding request queue is not available here. > > Technically, we can use fs_devices->lateste_bdev. But considering this bio > can map to multiple bios to multiple devices, limiting the size of this bio > under the minimum queue_max_zone_appends_sectors() among devices is > feasible. Well, how do you then ensure the bio actually fits all the other device limits as well? e.g. max segment size, no SG gaps policy, etc?