Commit 0aa9a8d4 authored by Ming Lei's avatar Ming Lei Committed by Greg Kroah-Hartman

block: avoid to break XEN by multi-page bvec

[ Upstream commit db5ebd6e ]

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>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 46a9cbe9
......@@ -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;
......
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