engines/io_uring: add new I/O engine for uring passthrough support
authorAnuj Gupta <anuj20.g@samsung.com>
Tue, 31 May 2022 13:31:51 +0000 (19:01 +0530)
committerJens Axboe <axboe@kernel.dk>
Thu, 2 Jun 2022 08:19:41 +0000 (02:19 -0600)
commit855dc4d44e000b68c01b0e33eae3389b49eb7f7f
treef34cf65765b18290de8531ae61b6bc09554b3cfa
parentb3d5e3fd80e3834097578e92d1b788065b8346e1
engines/io_uring: add new I/O engine for uring passthrough support

Add a new I/O engine (io_uring_cmd) for sending uring passthrough
commands. It will also use most of the existing helpers from the
I/O engine io_uring. The I/O preparation, completion, file open,
file close and post init paths are going to differ and hence
io_uring_cmd will have its own helper for them.

Add a new io_uring_cmd engine specific option to support nvme
passthrough commands. Filename name for this specific option
must specify nvme-ns generic character device (dev/ngXnY).
This provides io_uring_cmd I/O engine a bandwidth to support
various passthrough commands in future.

The engine_pos and engine_data fields in struct fio_file are
separated now. This will help I/O engine io_uring_cmd to store
specific data as well as keep track of register files.

Added a new option cmd_type. This specifies the type of uring
command to submit. Currently it only supports nvme uring command

Signed-off-by: Anuj Gupta <anuj20.g@samsung.com>
Co-authored-by: Ankit Kumar <ankit.kumar@samsung.com>
Link: https://lore.kernel.org/r/20220531133155.17493-6-ankit.kumar@samsung.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
engines/io_uring.c
file.h
os/linux/io_uring.h