Re: [PATCH 2/6] block: don't merge adjacent bvecs to one segment in bio blk_queue_split

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

 



On Sat, Mar 09, 2019 at 09:37:33AM +0800, Ming Lei wrote:
> For normal filesystem IO, each page is added via blk_add_page(),
> in which bvec(page) merge has been handled already, and basically
> not possible to merge two adjacent bvecs in one bio.
> 
> So not try to merge two adjacent bvecs in blk_queue_split(), also add
> check if one page is mergeable to current bvec in bio_add_page() for
> avoiding to break XEN.
> 
> Cc: ris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
> Cc: Juergen Gross <jgross@xxxxxxxx>
> Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx
> Cc: Omar Sandoval <osandov@xxxxxx>
> Cc: Christoph Hellwig <hch@xxxxxx>
> Signed-off-by: Ming Lei <ming.lei@xxxxxxxxxx>
> ---
>  block/bio.c       |  2 ++
>  block/blk-merge.c | 17 -----------------
>  2 files changed, 2 insertions(+), 17 deletions(-)
> 
> diff --git a/block/bio.c b/block/bio.c
> index 71a78d9fb8b7..d8f48188937c 100644
> --- a/block/bio.c
> +++ b/block/bio.c
> @@ -776,6 +776,8 @@ bool __bio_try_merge_page(struct bio *bio, struct page *page,
>  
>  		if (vec_end_addr + 1 != page_addr + off)
>  			return false;
> +		if (xen_domain() && !xen_biovec_phys_mergeable(bv, page))
> +			return false;
>  		if (same_page && (vec_end_addr & PAGE_MASK) != page_addr)
>  			return false;
>  

Reviewed-by: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux