blk-map: provide the bdev to bio if one exists
authorKeith Busch <kbusch@kernel.org>
Wed, 3 Sep 2025 20:27:46 +0000 (13:27 -0700)
committerJens Axboe <axboe@kernel.dk>
Tue, 9 Sep 2025 16:35:28 +0000 (10:35 -0600)
commitd0d1d522316e91f2b935a78bbf962b8e529d8c4f
tree784f85b80c8638bf90bfb551c2ea1d1728993c86
parentd57447ffb5fadffdba920f2fb933296fb6c5ff57
blk-map: provide the bdev to bio if one exists

We can now safely provide a block device when extracting user pages for
driver and user passthrough commands. Set the bdev so the caller doesn't
have to do that later. This has an additional  benefit of being able to
extract P2P pages in the passthrough path.

Signed-off-by: Keith Busch <kbusch@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-map.c
drivers/nvme/host/ioctl.c