On 09/09/24 10:17PM, Matthew Wilcox wrote:
On Fri, Aug 30, 2024 at 01:22:55PM +0530, Kundan Kumar wrote:
+++ b/block/bio.c
@@ -931,7 +931,8 @@ static bool bvec_try_merge_page(struct bio_vec *bv, struct page *page,
if (!zone_device_pages_have_same_pgmap(bv->bv_page, page))
return false;
- *same_page = ((vec_end_addr & PAGE_MASK) == page_addr);
+ *same_page = ((vec_end_addr & PAGE_MASK) == ((page_addr + off) &
+ PAGE_MASK));
if (!*same_page) {
if (IS_ENABLED(CONFIG_KMSAN))
return false;
This seems like a completely independent change, which has presumably
only now been noticed as a problem, but really should be in a separate
commit and marked for backporting?
Currently, the offset lies between 0 to PAGE_SIZE. Only after the
changes introduced in this series, folio_offset is used which can be
greater than PAGE_SIZE. So need not be backported.