Summary: This adds the helper functions for: - fsetxattr - setxattr Signed-off-by: Stefan Roesch <shr@xxxxxx> --- src/include/liburing.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/include/liburing.h b/src/include/liburing.h index 949a351..0b5dfab 100644 --- a/src/include/liburing.h +++ b/src/include/liburing.h @@ -729,6 +729,29 @@ static inline void io_uring_prep_msg_ring(struct io_uring_sqe *sqe, int fd, sqe->rw_flags = flags; } +static inline void io_uring_prep_setxattr(struct io_uring_sqe *sqe, + const char *name, + const char *value, + const char *path, + int flags, + size_t len) +{ + io_uring_prep_rw(IORING_OP_SETXATTR, sqe, 0, name, len, (__u64) value); + sqe->addr3 = (__u64) path; + sqe->xattr_flags = flags; +} + +static inline void io_uring_prep_fsetxattr(struct io_uring_sqe *sqe, + int fd, + const char *name, + const char *value, + int flags, + size_t len) +{ + io_uring_prep_rw(IORING_OP_FSETXATTR, sqe, fd, name, len, (__u64) value); + sqe->xattr_flags = flags; +} + /* * Returns number of unconsumed (if SQPOLL) or unsubmitted entries exist in * the SQ ring -- 2.30.2