Skip to content

Commit

Permalink
block: take offset into account in blk_bvec_map_sg again
Browse files Browse the repository at this point in the history
The rebase of commit 09595e0 ("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: 09595e0 ("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>
Link: https://lore.kernel.org/r/20240709070126.3019940-1-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
Christoph Hellwig authored and axboe committed Jul 9, 2024
1 parent 0ffc46e commit 61353a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions block/blk-merge.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/*
Expand Down

0 comments on commit 61353a6

Please sign in to comment.