Thread (21 messages) 21 messages, 7 authors, 2021-10-29

Re: [PATCH 0/3] implement direct IO with integrity

From: Jens Axboe <axboe@kernel.dk>
Date: 2021-10-28 15:13:16

On 10/28/21 5:24 AM, Alexander V. Buev wrote:
This series of patches makes possible to do direct block IO
with integrity payload using io uring kernel interface.
Userspace app can utilize READV/WRITEV operation with a new 
(unused before) flag in sqe struct to mark IO request as 
"request with integrity payload". 
When this flag is set, the last of provided iovecs
must contain pointer and length of this integrity payload.

Alexander V. Buev (3):
  block: bio-integrity: add PI iovec to bio
  block: io_uring: add IO_WITH_PI flag to SQE
  block: fops: handle IOCB_USE_PI in direct IO

 block/bio-integrity.c         | 124 +++++++++++++++++++++++++++++++++-
 block/fops.c                  |  71 +++++++++++++++++++
 fs/io_uring.c                 |  32 ++++++++-
 include/linux/bio.h           |   8 +++
 include/linux/fs.h            |   1 +
 include/uapi/linux/io_uring.h |   3 +
 6 files changed, 235 insertions(+), 4 deletions(-)
A couple of suggestions on this:

1) Don't think we need an IOSQE flag, those are mostly reserved for
   modifiers that apply to (mostly) all kinds of requests
2) I think this would be cleaner as a separate command, rather than
   need odd adjustments and iov assumptions. That also gets it out
   of the fast path.

I'd add IORING_OP_READV_PI and IORING_OP_WRITEV_PI for this, I think
you'd end up with a much cleaner implementation that way.

-- 
Jens Axboe
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help