summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2021-02-17 12:32:46 -0700
committerJens Axboe <axboe@kernel.dk>2021-02-17 12:32:46 -0700
commit245645c2ad3a74da4e2ab9df5cf308cfdd281112 (patch)
tree06900c06423bacc8a9257a8c067714fa164bf1c2
parentcb2e92ca9e165c8c26b3cc5a94e8f9c53efeeeb4 (diff)
parentb1815ff83628faacc90844eccacd30887e9defd1 (diff)
downloadliburing-245645c2ad3a74da4e2ab9df5cf308cfdd281112.tar.gz
liburing-245645c2ad3a74da4e2ab9df5cf308cfdd281112.tar.bz2
Merge branch 'master' of https://github.com/FletcherJ1/liburing
* 'master' of https://github.com/FletcherJ1/liburing: Added prep function for sync_file_range op
-rw-r--r--src/include/liburing.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/include/liburing.h b/src/include/liburing.h
index 6b2cfa1..65dddf7 100644
--- a/src/include/liburing.h
+++ b/src/include/liburing.h
@@ -527,6 +527,13 @@ static inline void io_uring_prep_renameat(struct io_uring_sqe *sqe, int olddfd,
sqe->rename_flags = flags;
}
+static inline void io_uring_prep_sync_file_range(struct io_uring_sqe *sqe, int fd,
+ unsigned len, off_t offset, int flags)
+{
+ io_uring_prep_rw(IORING_OP_SYNC_FILE_RANGE, sqe, fd, NULL, len, offset);
+ sqe->sync_range_flags = flags;
+}
+
/*
* Returns number of unconsumed (if SQPOLL) or unsubmitted entries exist in
* the SQ ring