aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Kadashev <dkadashev@gmail.com>2021-06-03 12:28:56 +0700
committerJens Axboe <axboe@kernel.dk>2021-06-21 09:58:19 -0600
commitcdc627df824a0cfb427ea8cdac766eec9cce1489 (patch)
tree4d3dbb26548e859a4fd9a56e74f76c2f1e616b1e
parent169493105b3e2608f45024ef79bf17de1c98e190 (diff)
downloadliburing-cdc627df824a0cfb427ea8cdac766eec9cce1489.tar.gz
liburing.h: add mkdirat prep helper
Signed-off-by: Dmitry Kadashev <dkadashev@gmail.com> Link: https://lore.kernel.org/r/20210603052906.2616489-2-dkadashev@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r--src/include/liburing.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/include/liburing.h b/src/include/liburing.h
index d3f8f91..b7f3bea 100644
--- a/src/include/liburing.h
+++ b/src/include/liburing.h
@@ -548,6 +548,12 @@ static inline void io_uring_prep_sync_file_range(struct io_uring_sqe *sqe,
sqe->sync_range_flags = flags;
}
+static inline void io_uring_prep_mkdirat(struct io_uring_sqe *sqe, int dfd,
+ const char *path, mode_t mode)
+{
+ io_uring_prep_rw(IORING_OP_MKDIRAT, sqe, dfd, path, mode, 0);
+}
+
/*
* Returns number of unconsumed (if SQPOLL) or unsubmitted entries exist in
* the SQ ring