Skip to content

RFC userspace PI passthrough via io_uring

Bob Liu io-uring linux-block linux-fsdevel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest4 patches 11 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4io_uring: add IORING_OP_READ{WRITE}V_PI cmdfs/io_uring.c include/linux/fs.h include/uapi/linux/io_uring.h+15 -07 replies
2/4bio-integrity: introduce two funcs handle protect informationblock/bio-integrity.c include/linux/bio.h+91 -02 replies
3/4block_dev: support protect information passthroughfs/block_dev.c+17 -01 reply
4/4liburing/test: add testcase for protect information passthroughsrc/include/liburing.h src/include/liburing/io_uring.h test/Makefile +1 more+287 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/4] userspace PI passthrough via io_uring

This RFC provides a rough implementation of a mechanism to allow userspace to attach protection information (e.g. T10 DIF) data to a disk write and to receive the information alongside a disk read. The interface is an extension to the io_uring interface:
two new commands (IORING_OP_READV{WRITEV}_PI) are provided. The last struct iovec in the arg list is interpreted to point to a buffer containing the the PI data.

Patch #1 add two new commands to io_uring.
Patch #2 introduces two helper funcs in bio-integrity. Patch #3 implement the PI passthrough in direct-io of block-dev. (Similar extensions may add to fs/direct-io.c and fs/maps/directio.c) Patch #4 add io_uring use space test case to liburing.

Welcome any feedbacks.
Thanks!

There was attempt before[1], but was based on AIO at that time.
[1] https://www.mail-archive.com/[email protected]/msg27537.html

Bob Liu (3):
io_uring: add IORING_OP_READ{WRITE}V_PI cmd
bio-integrity: introduce two funcs handle protect information
block_dev: support protect information passthrough

 block/bio-integrity.c         | 77 +++++++++++++++++++++++++++++++++++++++++++
 fs/block_dev.c                | 17 ++++++++++
 fs/io_uring.c                 | 12 +++++++
 include/linux/bio.h           | 14 ++++++++
 include/linux/fs.h            |  1 +
 include/uapi/linux/io_uring.h |  2 ++
 6 files changed, 123 insertions(+)
Signature · 1 line
2.9.5