Skip to content

io_uring: add sync_file_range and drains

Jens Axboe linux-block linux-fsdevel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3io_uring: add support for marking commands as drainingfs/io_uring.c include/uapi/linux/io_uring.h+89 -31 reply
2/3fs: add sync_file_range() helperfs/sync.c include/linux/fs.h+74 -640 replies
3/3io_uring: add support for IORING_OP_SYNC_FILE_RANGEfs/io_uring.c include/uapi/linux/io_uring.h+53 -00 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCHSET 0/3] io_uring: add sync_file_range and drains

In continuation of the fsync barrier patch from the other day, I reworked that patch to turn it into a general primitive instead. This means that any command can be flagged with IOSQE_IO_DRAIN, which will insert a sequence point in the queue. If a request is marked with IOSQE_IO_DRAIN, then previous commands must complete before this one is issued. Subsequent requests are not started until the drain has completed. The latter is a necessity since we track this through the CQ index. If we allow later commands, then they could complete before earlier commands and we'd mistakenly think that we have satisfied the sequence point.

Patch 2 is just a prep patch for patch 3, which adds support for sync_file_range() through io_uring. sync_file_range() is heavily used by RocksDB.

Patches are also in my io_uring-next branch;

git://git.kernel.dk/linux-block io_uring-next

 fs/io_uring.c                 | 142 +++++++++++++++++++++++++++++++++-
 fs/sync.c                     | 135 +++++++++++++++++---------------
 include/linux/fs.h            |   3 +
 include/uapi/linux/io_uring.h |   3 +
 4 files changed, 216 insertions(+), 67 deletions(-)
Signature · 1 line
Jens Axboe