io_uring_sqe_set_data(3)
β¨ io_uring_sqe_set_data β bestie, let's label your requests β¨
okay so this is a page from the liburing Manual (yes, the io_uring girlies stay winning) π
πΈ NAME πΈ
io_uring_sqe_set_data β set user data for submission queue event
π SYNOPSIS π
#include <liburing.h>
void io_uring_sqe_set_data(struct io_uring_sqe *sqe,
void *user_data);
void io_uring_sqe_set_data64(struct io_uring_sqe *sqe,
__u64 data);
π¦ DESCRIPTION π¦
so. picture this. you've got a submission queue entry, and it's just sitting there, anonymous, no identity, no lore. tragic. π
The io_uring_sqe_set_data(3) function stores a user_data pointer with the submission queue entry sqe.
The io_uring_sqe_set_data64(3) function stores a 64-bit data value with the submission queue entry sqe.
After the caller has requested a submission queue entry (SQE) with io_uring_get_sqe(3), they can associate a data pointer or value with the SQE. Once the completion arrives, the function io_uring_cqe_get_data(3) or io_uring_cqe_get_data64(3) can be called to retrieve the data pointer or value associated with the submitted request. it's giving "tag it so you can find it again" energy, and honestly? iconic. π«Ά
β οΈ no cap, this is the part you have to read: note that if neither of these functions are called, or theuser_datafield in thesqeisn't set manually either, then the field may contain a value from a previous use of this sqe. If an application relies on always having a validuser_datavalue present, it must always assign one to each sqe. like, every single time. no skipping. the stale-data jumpscare is real π
π RETURN VALUE π
None. that's it, that's the whole section, she returns nothing and she's thriving π
π SEE ALSO π
and that's the whole page bestie!! this one came from liburing-2.1, dated November 15, 2021, and it lives at io_uring_sqe_set_data(3) πβ¨ go set your data and 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 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 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) 2021 Stefan Roesch <shr@fb.com>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms