ZiyangZhang c86019ff75 ublk_drv: add support for UBLK_IO_NEED_GET_DATA
UBLK_IO_NEED_GET_DATA is one ublk IO command. It is designed for a user
application who wants to allocate IO buffer and set IO buffer address
only after it receives an IO request from ublksrv. This is a reasonable
scenario because these users may use a RPC framework as one IO backend
to handle IO requests passed from ublksrv. And a RPC framework may
allocate its own buffer(or memory pool).

This new feature (UBLK_F_NEED_GET_DATA) is optional for ublk users.
Related userspace code has been added in ublksrv[1] as one pull request.

Test cases for this feature are added in ublksrv and all the tests pass.
The performance result shows that this new feature does bring additional
latency because one IO is issued back to ublk_drv once again to copy data
from bio vectors to user-provided data buffer. UBLK_IO_NEED_GET_DATA is
suitable for bigger block size such as 512B or 1MB.

[1] https://github.com/ming1/ubdsrv

Signed-off-by: ZiyangZhang <ZiyangZhang@linux.alibaba.com>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/3a21007ea1be8304246e654cebbd581ab0012623.1659011443.git.ZiyangZhang@linux.alibaba.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-08-02 21:13:40 -06:00
..
2022-06-28 06:33:15 -06:00
2022-06-28 06:33:15 -06:00
2022-06-28 06:33:15 -06:00
2022-07-14 12:14:31 -06:00
2022-07-14 12:14:31 -06:00
2022-08-02 17:22:46 -06:00
2022-06-28 06:33:15 -06:00
2022-08-02 17:22:46 -06:00
2022-06-28 06:33:15 -06:00
2022-08-02 17:22:41 -06:00
2022-06-28 06:33:15 -06:00
2022-06-28 06:33:15 -06:00
2022-06-28 06:33:15 -06:00
2022-06-28 06:33:15 -06:00
2022-06-28 06:33:15 -06:00
2022-06-28 06:33:15 -06:00
2022-08-02 13:46:35 -07:00
2022-06-28 06:33:15 -06:00