block: move the bi_size update out of __bio_try_merge_page
authorChristoph Hellwig <hch@lst.de>
Mon, 24 Jul 2023 16:54:32 +0000 (09:54 -0700)
committerJens Axboe <axboe@kernel.dk>
Tue, 25 Jul 2023 01:55:16 +0000 (19:55 -0600)
commit858c708d9efb7e8e5c6320793b778cc17cf8368a
treef463c73809917e735451096b6f891173d4740236
parent80232b520314214d846eb0a65faef8b51b702fa7
block: move the bi_size update out of __bio_try_merge_page

The update of bi_size is the only thing in __bio_try_merge_page that
needs a bio.  Move it to the callers, and merge __bio_try_merge_page
and page_is_mergeable into a single bvec_try_merge_page that only takes
the current bvec instead of a full bio.  This will allow reusing this
function for supporting multi-page integrity payload bvecs.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jinyoung Choi <j-young.choi@samsung.com>
Link: https://lore.kernel.org/r/20230724165433.117645-8-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/bio.c