io_uring_prep_symlinkat(3)
β¨ io_uring_prep_symlinkat β¨
okay bestie, so this is a page from the liburing Manual, and it's all about io_uring_prep_symlinkat(3) β the function that gets your symlink requests ready to go. no cap, it's giving "make a link, but async" π
πΈ NAME πΈ
io_uring_prep_symlinkat β prepare a symlinkat request
π SYNOPSIS π
#include <fcntl.h>
#include <unistd.h>
#include <liburing.h>
void io_uring_prep_symlinkat(struct io_uring_sqe *sqe,
const char *target,
int newdirfd,
const char *linkpath);
void io_uring_prep_symlink(struct io_uring_sqe *sqe,
const char *target,
const char *linkpath);
like, two whole functions, both of them icons π
π¦ DESCRIPTION π¦
so, the io_uring_prep_symlinkat(3) function prepares a symlinkat request. it takes that submission queue entry, your sqe, and sets it up to symlink the target path that target points to, over to the new destination indicated by newdirfd and linkpath. that's the whole vibe π
meanwhile, io_uring_prep_symlink(3) prepares a plain symlink request. the sqe gets set up to symlink the target path that target points to, over to the new destination indicated by linkpath β but this time relative to the current working directory. and yes, this one prepares an async symlink(2) request, so go read that man page for the deets π
fr fr, these functions prepare an async symlinkat(2) or symlink(2) request. see those man pages for details. periodt π
π RETURN VALUE π
None. that's it, that's the whole thing. nothing returned, no crumbs π«Ά
π ERRORS π
the CQE res field is where the result of the operation lives. check the related man page for what possible values it could be, iykyk.
but here's the tea, bestie: where synchronous system calls would 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 don't be out here checking errno, she's not the main character here π
π₯ NOTES π₯
okay so this is important. as with any request that passes in data in a struct, that data must remain valid until the request has been successfully submitted. it does not need to remain valid until completion. once a request has been submitted, the in-kernel state is stable β she's locked in, no takebacks β¨
very early kernels (5.4 and earlier) required state to be stable until the completion occurred. so if you're on ancient kernel energy, watch out π
applications can test for this behavior by inspecting the IORING_FEAT_SUBMIT_STABLE flag passed back from io_uring_queue_init_params(3). go check that flag, it'll tell you what you're working with π
β SEE ALSO β
and that's the whole page, bestie!! π this one's from liburing-2.2, dated March 13, 2022 β so like, vintage but still slaying. go make some symlinks, you've got this ππ¦β¨
π¦ 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) 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