Re: [PATCH v7 19/39] btrfs: limit bio size under max_zone_append_size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Sep 11, 2020 at 03:17:19PM +0100, Christoph Hellwig wrote:
On Fri, Sep 11, 2020 at 09:32:39PM +0900, Naohiro Aota wrote:
+		if (fs_info->max_zone_append_size &&
+		    bio_op(bio) == REQ_OP_WRITE &&
+		    bio->bi_iter.bi_size + size > fs_info->max_zone_append_size)
+			can_merge = false;
+
 		if (prev_bio_flags != bio_flags || !contig || !can_merge ||
 		    force_bio_submit ||
 		    bio_add_page(bio, page, page_size, pg_offset) < page_size) {

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.



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux