block: ublk_drv: cleanup 'struct ublk_map_data'
authorMing Lei <ming.lei@redhat.com>
Thu, 30 Mar 2023 11:36:24 +0000 (19:36 +0800)
committerJens Axboe <axboe@kernel.dk>
Mon, 3 Apr 2023 01:22:55 +0000 (19:22 -0600)
commitae9f5ccea4c268a96763e51239b32d6b5172c18c
treea7a1f1f41e4700db5cf175cb4b9d7d38e73e26fa
parent96cf2f5404c8bc979628a2b495852d735a56c5b5
block: ublk_drv: cleanup 'struct ublk_map_data'

'struct ublk_map_data' is passed to ublk_copy_user_pages()
for copying data between userspace buffer and request pages.

Here what matters is userspace buffer address/len and 'struct request',
so replace ->io field with user buffer address, and rename max_bytes
as len.

Meantime remove 'ubq' field from ublk_map_data, since it isn't used
any more.

Then code becomes more readable.

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