io_uring_prep_getxattr(3)

πŸ’– NAME πŸ’–

io_uring_prep_getxattr, io_uring_prep_fgetxattr β€” bestie, these two are here to prep a request that gets an extended attribute value. That's the whole job. They prep. You submit. Slay. ✨

This is from the liburing manual, and it's giving very much "small function, big responsibility" energy. πŸŽ€


✨ SYNOPSIS ✨

#include <liburing.h>

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

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

okay so two functions, same vibe, slightly different ways of pointing at the thing. one wants a path, one wants an fd. iykyk. πŸ¦‹


🌸 DESCRIPTION 🌸

The io_uring_prep_getxattr(3) function prepares a request to get an extended attribute value. Not me hyping up a prep function, but here we are. πŸ’…

The submission queue entry sqe is set up to get the value of the extended attribute identified by name and associated with the given path in the filesystem. The len argument specifies the size (in bytes) of value. So like, len is how much room you're giving it, bestie β€” make sure value can actually hold that many bytes, mwah. 🌈

io_uring_prep_fgetxattr(3) is literally identical to io_uring_prep_getxattr(3), except the open file referred to by fd is the one getting interrogated instead of path. Same energy, different address. Periodt. πŸ‘‘

This function prepares an async getxattr(2) request. So if you want the full lore on how getxattr actually behaves, go read that man page β€” it's the main character here, this one's just the setup girlie. πŸ”₯

fr fr, all the real details live in getxattr(2). We're just prepping the request over here. 🫢

⭐ RETURN VALUE ⭐

None.

That's it. That's the whole section. It preps, it doesn't return. Iconic minimalism honestly. πŸ’€βœ¨


πŸ¦‹ SEE ALSO πŸ¦‹


and that's the whole page, bestie!! this was pulled from liburing-2.4, dated January 23, 2023. go forth and get those extended attributes, you absolute legend. πŸŽ€πŸ’œπŸŒΈ no cap.

πŸ“¦ where this page comes from