Commit db5ebd6e authored by Ming Lei's avatar Ming Lei Committed by Jens Axboe

block: avoid to break XEN by multi-page bvec

XEN has special page merge requirement, see xen_biovec_phys_mergeable().
We can't merge pages into one bvec simply for XEN.

So move XEN's specific check on page merge into __bio_try_merge_page(),
then abvoid to break XEN by multi-page bvec.

Cc: ris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: xen-devel@lists.xenproject.org
Cc: Omar Sandoval <osandov@fb.com>
Cc: Christoph Hellwig <hch@lst.de>
Reviewed-by: default avatarJuergen Gross <jgross@suse.com>
Signed-off-by: default avatarMing Lei <ming.lei@redhat.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 0383ad43
...@@ -776,6 +776,8 @@ bool __bio_try_merge_page(struct bio *bio, struct page *page, ...@@ -776,6 +776,8 @@ bool __bio_try_merge_page(struct bio *bio, struct page *page,
if (vec_end_addr + 1 != page_addr + off) if (vec_end_addr + 1 != page_addr + off)
return false; return false;
if (xen_domain() && !xen_biovec_phys_mergeable(bv, page))
return false;
if (same_page && (vec_end_addr & PAGE_MASK) != page_addr) if (same_page && (vec_end_addr & PAGE_MASK) != page_addr)
return false; return false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment