io_uring_prep_statx(3)
π io_uring_prep_statx β the liburing manual, but make it cute
okay bestie, so this one lives in the liburing manual, and it's all about prepping a statx request. yes, the async kind. no cap. β¨
πΈ NAME πΈ
io_uring_prep_statx β prepare a statx request
like. that's the whole job. it prepares. it does not submit. it does not wait. it preps. main character energy, honestly. π
β¨ SYNOPSIS β¨
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <fcntl.h>
#include <liburing.h>
void io_uring_prep_statx(struct io_uring_sqe *sqe,
int dirfd,
const char *path,
int flags,
unsigned mask,
struct statx *statxbuf);
look at those includes. five headers and then liburing.h like the finale. the way that signature just sits there. π
π¦ DESCRIPTION π¦
so. the io_uring_prep_statx(3) function prepares a statx request. the submission queue entry sqe gets set up to use the directory file descriptor pointed to by dirfd to start a statx operation on the path identified by path, and it uses the flags given in flags for the fields specified by mask, writing into the buffer located at statxbuf. periodt. π
this function prepares an async statx(2) request. and if you want the actual deets on what all of that even means, go read that man page, because this one is just the prep girlie. see statx(2) for details. π
π₯ RETURN VALUE π₯
None
(yeah. it returns nothing. it's above returning things. it just sets up the sqe and lets you handle the rest. iconic behavior, ngl.) π
π ERRORS π
the CQE res field will contain the result of the operation. see the related man page for details on possible values. π
and here's the tea, bestie β where synchronous system calls will return -1 on failure and set errno to the actual error value, io_uring never uses errno. instead it returns the negated errno directly in the CQE res field. so like. don't go checking errno and getting confused. she doesn't play that game. π
β NOTES β
as with any request that passes in data in a struct, that data must remain valid until the request has been successfully submitted. it need not remain valid until completion. once a request has been submitted, the in-kernel state is stable. π
very early kernels (5.4 and earlier) required state to be stable until the completion occurred. so if you're on something ancient, that's the vibe you're dealing with.
applications can test for this behavior by inspecting the IORING_FEAT_SUBMIT_STABLE flag passed back from io_uring_queue_init_params(3). it's giving "check the feature flag, bestie." π
π«Ά SEE ALSO π«Ά
and that's the whole page, babes!! this little slice of documentation is from liburing-2.2, dated March 13, 2022, and it lives in the liburing Manual. go prep those statx requests. slay. πβ¨
π¦ where this page comes from
- alpine 3.22: liburing-doc 2.9-r0 Β· LGPL-2.1-or-later OR MIT
- alpine 3.23: liburing-doc 2.12-r0 Β· LGPL-2.1-or-later OR MIT
- alpine 3.24: liburing-doc 2.14-r0 Β· LGPL-2.1-or-later OR MIT
- arch rolling: liburing 2.15-1 Β· GPL-2.0-only WITH Linux-syscall-note OR MIT AND LGPL-2.0-or-later AND MIT
- centos-stream 10: liburing-devel 2.12-1.el10 Β· (GPLv2 with exceptions and LGPLv2+) or MIT
- centos-stream 9: liburing-devel 2.12-1.el9 Β· (GPLv2 with exceptions and LGPLv2+) or MIT
- centos-stream 9: liburing-devel 2.12-1.el9 Β· (GPLv2 with exceptions and LGPLv2+) or MIT
- debian bookworm: liburing-dev 2.3-3
- debian trixie: liburing-dev 2.9-1
- fedora 43: liburing-devel 2.9-2.fc43 Β· (GPL-2.0-only WITH Linux-syscall-note OR MIT) AND (LGPL-2.0-or-later OR MIT)
- fedora 43: liburing-devel 2.9-2.fc43 Β· (GPL-2.0-only WITH Linux-syscall-note OR MIT) AND (LGPL-2.0-or-later OR MIT)
- fedora 44: liburing-devel 2.13-2.fc44 Β· (GPL-2.0-only WITH Linux-syscall-note OR MIT) AND (LGPL-2.0-or-later OR MIT)
- fedora 44: liburing-devel 2.13-2.fc44 Β· (GPL-2.0-only WITH Linux-syscall-note OR MIT) AND (LGPL-2.0-or-later OR MIT)
- nixpkgs unstable: liburing 2.14
- opensuse-leap 16.0: liburing-devel 2.8-160000.3.1 Β· (GPL-2.0-only AND LGPL-2.1-or-later) OR MIT
- opensuse-leap 16.0: liburing-devel 2.8-160000.3.1 Β· (GPL-2.0-only AND LGPL-2.1-or-later) OR MIT
- opensuse-leap 16.0: liburing-devel 2.8-160000.3.1 Β· (GPL-2.0-only AND LGPL-2.1-or-later) OR MIT
- opensuse-leap 16.0: liburing-devel 2.8-160000.3.1 Β· (GPL-2.0-only AND LGPL-2.1-or-later) OR MIT
- ubuntu noble: liburing-dev 2.5-1build1
- ubuntu questing: liburing-dev 2.11-1
- ubuntu resolute: liburing-dev 2.14-1
- ubuntu stonking: liburing-dev 2.15-1
- π the page's license: LGPL-2.0-or-later
- Copyright (C) 2022 Jens Axboe <axboe@kernel.dk>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms