block: copy back bounce buffer to user-space correctly in case of split
authorChristoph Hellwig <hch@lst.de>
Thu, 28 Nov 2024 11:22:32 +0000 (16:52 +0530)
committerJens Axboe <axboe@kernel.dk>
Mon, 16 Dec 2024 13:58:14 +0000 (06:58 -0700)
commitaf891b0c75bd0e2949e49357185a534829bbcfbd
tree5cf6fb6aedcf336bcf4b00fc482475f11f7c35ee
parente463d929c2ae71ab82368b48df1ab4ca05b9c21f
block: copy back bounce buffer to user-space correctly in case of split

Copy back the bounce buffer to user-space in entirety when the parent
bio completes. The existing code uses bip_iter.bi_size for sizing the
copy, which can be modified. So move away from that and fetch it from
the vector passed to the block layer. While at it, switch to using
better variable names.

Fixes: 492c5d455969f ("block: bio-integrity: directly map user buffers")
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Anuj Gupta <anuj20.g@samsung.com>
Reviewed-by: Keith Busch <kbusch@kernel.org>
Link: https://lore.kernel.org/r/20241128112240.8867-3-anuj20.g@samsung.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/bio-integrity.c