From: Christoph Hellwig <hch@lst.de>
To: axboe@kernel.dk
Cc: linux-block@vger.kernel.org, Yi Zhang <yi.zhang@redhat.com>,
Chaitanya Kulkarni <chaitanyak@nvidia.com>
Subject: [PATCH] block: take offset into account in blk_bvec_map_sg again
Date: Tue, 9 Jul 2024 09:01:25 +0200 [thread overview]
Message-ID: <20240709070126.3019940-1-hch@lst.de> (raw)
The rebase of commit 09595e0c9d65 ("block: pass a phys_addr_t to
get_max_segment_size") lost adding the total to to the offset in
blk_bvec_map_sg. Add it back.
Fixes: 09595e0c9d65 ("block: pass a phys_addr_t to get_max_segment_size")
Reported-by: Yi Zhang <yi.zhang@redhat.com>
Reported-by: Chaitanya Kulkarni <chaitanyak@nvidia.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
block/blk-merge.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/block/blk-merge.c b/block/blk-merge.c
index e41ea331809936..048d07a5091f79 100644
--- a/block/blk-merge.c
+++ b/block/blk-merge.c
@@ -491,8 +491,8 @@ static unsigned blk_bvec_map_sg(struct request_queue *q,
while (nbytes > 0) {
unsigned offset = bvec->bv_offset + total;
- unsigned len = get_max_segment_size(&q->limits, bvec_phys(bvec),
- nbytes);
+ unsigned len = get_max_segment_size(&q->limits,
+ bvec_phys(bvec) + total, nbytes);
struct page *page = bvec->bv_page;
/*
--
2.43.0
next reply other threads:[~2024-07-09 7:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-09 7:01 Christoph Hellwig [this message]
2024-07-09 7:03 ` [PATCH] block: take offset into account in blk_bvec_map_sg again Jens Axboe
2024-07-10 7:05 ` Geert Uytterhoeven
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240709070126.3019940-1-hch@lst.de \
--to=hch@lst.de \
--cc=axboe@kernel.dk \
--cc=chaitanyak@nvidia.com \
--cc=linux-block@vger.kernel.org \
--cc=yi.zhang@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox