summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Roesch <shr@fb.com>2021-11-23 10:07:51 -0800
committerJens Axboe <axboe@kernel.dk>2021-12-22 07:16:55 -0700
commite96303ed7d2725c0b548b4f1df3fdbf207b0385f (patch)
treef1a3b0b6b6b8e9270c45b37732a07e618f364d21
parentbaf0a8c986e0ef6a7472d9b86dc072c1b2f2e390 (diff)
downloadliburing-e96303ed7d2725c0b548b4f1df3fdbf207b0385f.tar.gz
liburing-e96303ed7d2725c0b548b4f1df3fdbf207b0385f.tar.bz2
liburing: add prepare function for getdents64
Adds the io_uring_prep_getdents() function to setup a getdents64 call. Signed-off-by: Stefan Roesch <shr@fb.com> Link: https://lore.kernel.org/r/20211123180753.1598611-3-shr@fb.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 3705c5b..c334d04 100644
--- a/src/include/liburing.h
+++ b/src/include/liburing.h
@@ -701,6 +701,12 @@ static inline void io_uring_prep_linkat(struct io_uring_sqe *sqe, int olddfd,
sqe->hardlink_flags = (__u32) flags;
}
+static inline void io_uring_prep_getdents(struct io_uring_sqe *sqe, int fd,
+ void *buf, unsigned int count, uint64_t offset)
+{
+ io_uring_prep_rw(IORING_OP_GETDENTS, sqe, fd, buf, count, offset);
+}
+
/*
* Returns number of unconsumed (if SQPOLL) or unsubmitted entries exist in
* the SQ ring