Linux block layer
 help / color / mirror / Atom feed
* [PATCH] block: take offset into account in blk_bvec_map_sg again
@ 2024-07-09  7:01 Christoph Hellwig
  2024-07-09  7:03 ` Jens Axboe
  2024-07-10  7:05 ` Geert Uytterhoeven
  0 siblings, 2 replies; 3+ messages in thread
From: Christoph Hellwig @ 2024-07-09  7:01 UTC (permalink / raw)
  To: axboe; +Cc: linux-block, Yi Zhang, Chaitanya Kulkarni

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] block: take offset into account in blk_bvec_map_sg again
  2024-07-09  7:01 [PATCH] block: take offset into account in blk_bvec_map_sg again Christoph Hellwig
@ 2024-07-09  7:03 ` Jens Axboe
  2024-07-10  7:05 ` Geert Uytterhoeven
  1 sibling, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2024-07-09  7:03 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: linux-block, Yi Zhang, Chaitanya Kulkarni


On Tue, 09 Jul 2024 09:01:25 +0200, Christoph Hellwig wrote:
> 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.
> 
> 

Applied, thanks!

[1/1] block: take offset into account in blk_bvec_map_sg again
      commit: 61353a63a22890f2c642232ae1ab4a2e02e6a27c

Best regards,
-- 
Jens Axboe




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] block: take offset into account in blk_bvec_map_sg again
  2024-07-09  7:01 [PATCH] block: take offset into account in blk_bvec_map_sg again Christoph Hellwig
  2024-07-09  7:03 ` Jens Axboe
@ 2024-07-10  7:05 ` Geert Uytterhoeven
  1 sibling, 0 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2024-07-10  7:05 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: axboe, linux-block, Yi Zhang, Chaitanya Kulkarni

On Tue, 9 Jul 2024, Christoph Hellwig wrote:
> 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>

Thanks, that fixes booting landisk!

Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

 						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
 							    -- Linus Torvalds

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-07-10  7:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-09  7:01 [PATCH] block: take offset into account in blk_bvec_map_sg again Christoph Hellwig
2024-07-09  7:03 ` Jens Axboe
2024-07-10  7:05 ` Geert Uytterhoeven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox