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 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.



[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