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 <[email protected]>
> Cc: Juergen Gross <[email protected]>
> Cc: [email protected]
> Cc: Omar Sandoval <[email protected]>
> Cc: Christoph Hellwig <[email protected]>
> Signed-off-by: Ming Lei <[email protected]>
> ---
>  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 <[email protected]>


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to