block: ublk_drv: add two helpers to clean up map/unmap request
authorMing Lei <ming.lei@redhat.com>
Thu, 30 Mar 2023 11:36:22 +0000 (19:36 +0800)
committerJens Axboe <axboe@kernel.dk>
Mon, 3 Apr 2023 01:22:54 +0000 (19:22 -0600)
commit2f3af723447c35c16f3c6a1b4b317c61dc41d6c3
tree6bac7bc115f146362450c9b3837b6e44f078af6e
parent23ef8220f287abe5bf741ddfc278e7359742d3b1
block: ublk_drv: add two helpers to clean up map/unmap request

Add two helpers for checking if map/unmap is needed, since we may have
passthrough request which needs map or unmap in future, such as for
supporting report zones.

Meantime don't mark ublk_copy_user_pages as inline since this function
is a bit fat now.

Reviewed-by: Ziyang Zhang <ZiyangZhang@linux.alibaba.com>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/ublk_drv.c