aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Kadashev <dkadashev@gmail.com>2021-06-03 12:29:02 +0700
committerJens Axboe <axboe@kernel.dk>2021-06-21 09:58:19 -0600
commitce293fa00ea961f2c577e60b101b8a65c0783857 (patch)
treedd7420ace7eb0b19a44c451fbc638735da325260
parent38b51da222500922773b2e4cec8fe03d113d9939 (diff)
downloadliburing-ce293fa00ea961f2c577e60b101b8a65c0783857.tar.gz
liburing.h: add linkat prep helper
Signed-off-by: Dmitry Kadashev <dkadashev@gmail.com> Link: https://lore.kernel.org/r/20210603052906.2616489-8-dkadashev@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r--src/include/liburing.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/include/liburing.h b/src/include/liburing.h
index e033543..51dc602 100644
--- a/src/include/liburing.h
+++ b/src/include/liburing.h
@@ -561,6 +561,15 @@ static inline void io_uring_prep_symlinkat(struct io_uring_sqe *sqe,
(uint64_t) (uintptr_t) linkpath);
}
+static inline void io_uring_prep_linkat(struct io_uring_sqe *sqe, int olddfd,
+ const char *oldpath, int newdfd,
+ const char *newpath, int flags)
+{
+ io_uring_prep_rw(IORING_OP_LINKAT, sqe, olddfd, oldpath, newdfd,
+ (uint64_t) (uintptr_t) newpath);
+ sqe->hardlink_flags = flags;
+}
+
/*
* Returns number of unconsumed (if SQPOLL) or unsubmitted entries exist in
* the SQ ring