io_uring_prep_setxattr(3)

✨ io_uring_prep_setxattr β€” bestie edition ✨

okay so this page lives in the liburing manual, and it's about two lil functions that go hand in hand: io_uring_prep_setxattr and io_uring_prep_fsetxattr. they prepare a request to set an extended attribute value. yes, xattrs, we love them, we respect them πŸ’–


🌸 NAME 🌸

io_uring_prep_setxattr, io_uring_prep_fsetxattr β€” prepare a request to set an extended attribute value πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <liburing.h>

void io_uring_prep_setxattr(struct io_uring_sqe *sqe,
                            const char *name,
                            const char *value,
                            const char *path,
                            int flags,
                            unsigned int len);

void io_uring_prep_fsetxattr(struct io_uring_sqe *sqe,
                             int fd,
                             const char *name,
                             const char *value,
                             int flags,
                             unsigned int len);

πŸ’… DESCRIPTION πŸ’…

so io_uring_prep_setxattr(3) is the function that gets a request ready to set an extended attribute value. it takes your submission queue entry, that's the sqe, and sets it up so it'll set the value of the extended attribute identified by name, which is associated with the given path in the filesystem, with the modifier flags flags. and the len argument? that one specifies the size (in bytes) of value. yes bestie, bytes, we're measuring πŸ’–

and io_uring_prep_fsetxattr(3) is literally identical to io_uring_prep_setxattr(3), with exactly one glow-up: instead of path, the extended attribute gets set on the open file referred to by fd. that's the whole difference. iconic. πŸ‘‘

fr fr, this function prepares an async setxattr(2) request. so go read that man page for the details, it's giving lore.

⭐ RETURN VALUE ⭐

None. that's it. nothing. it returns nothing, it's not that kind of function, and honestly? respect. 🫢


🌈 SEE ALSO 🌈


and that's the whole page, bestie!! πŸ’œ this one came from liburing-2.4 and it was dated January 23, 2023 β€” go forth and set those extended attributes, no cap πŸ¦‹βœ¨πŸŽ€

πŸ“¦ where this page comes from