Skip to content

btrfs: io_uring interface for encoded reads

Mark Harmstone io-uring linux-btrfs 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest5 patches 12 repliesIn review
  2. v35 patches 11 repliesSuperseded

Changes in v4 from the cover letter

* Rewritten to avoid taking function pointer
* Removed nowait parameter, as this could be derived from iocb flags
* Fixed structure not getting properly initialized
* Followed ioctl by capping uncompressed reads at EOF
* Rebased against btrfs/for-next
* Formatting fixes
* Rearranged structs to minimize holes
* Published test program
* Fixed potential data race with userspace
* Changed to use io_uring_cmd_to_pdu helper function
* Added comments for potentially confusing parts of the code

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5btrfs: remove pointless addition in btrfs_encoded_readfs/btrfs/inode.c+1 -42 replies
2/5btrfs: change btrfs_encoded_read so that reading of extent is done by callerfs/btrfs/btrfs_inode.h fs/btrfs/inode.c fs/btrfs/ioctl.c+69 -320 replies
3/5btrfs: don't sleep in btrfs_encoded_read if IOCB_NOWAIT setfs/btrfs/inode.c+43 -110 replies
4/5btrfs: move priv off stack in btrfs_encoded_read_regular_fill_pagesfs/btrfs/inode.c+18 -110 replies
5/5btrfs: add io_uring command for encoded readsfs/btrfs/btrfs_inode.h fs/btrfs/file.c fs/btrfs/inode.c +3 more+349 -126 replies

Reviews trailers per patch

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

Read the v4 thread

Cover letter [PATCH v4 0/5] btrfs: io_uring interface for encoded reads

This is version 4 of a patch series to add an io_uring interface for encoded reads. The principal use case for this is to eventually allow btrfs send and receive to operate asynchronously, the lack of io_uring encoded I/O being one of the main blockers for this.

I've written a test program for this, which demonstrates the ioctl and io_uring interface produce identical results: https://github.com/maharmstone/io_uring-encoded

Changelog:
v4:
* Rewritten to avoid taking function pointer
* Removed nowait parameter, as this could be derived from iocb flags
* Fixed structure not getting properly initialized
* Followed ioctl by capping uncompressed reads at EOF
* Rebased against btrfs/for-next
* Formatting fixes
* Rearranged structs to minimize holes
* Published test program
* Fixed potential data race with userspace
* Changed to use io_uring_cmd_to_pdu helper function
* Added comments for potentially confusing parts of the code

v3:
* Redo of previous versions

Mark Harmstone (5):
btrfs: remove pointless addition in btrfs_encoded_read
btrfs: change btrfs_encoded_read so that reading of extent is done by
caller
btrfs: don't sleep in btrfs_encoded_read if IOCB_NOWAIT set
btrfs: move priv off stack in btrfs_encoded_read_regular_fill_pages
btrfs: add io_uring command for encoded reads

 fs/btrfs/btrfs_inode.h |  13 +-
 fs/btrfs/file.c        |   1 +
 fs/btrfs/inode.c       | 175 ++++++++++++++-------
 fs/btrfs/ioctl.c       | 342 ++++++++++++++++++++++++++++++++++++++++-
 fs/btrfs/ioctl.h       |   2 +
 fs/btrfs/send.c        |   3 +-
 6 files changed, 473 insertions(+), 63 deletions(-)
Signature · 1 line
2.45.2