1io_uring_prep_linkat(3) liburing Manual io_uring_prep_linkat(3)
2
3
4
6 io_uring_prep_linkat - prepare a linkat request
7
9 #include <fcntl.h>
10 #include <unistd.h>
11 #include <liburing.h>
12
13 void io_uring_prep_linkat(struct io_uring_sqe *sqe,
14 int olddirfd,
15 const char *oldpath,
16 int newdirfd,
17 const char *newpath,
18 int flags);
19
20 void io_uring_prep_link(struct io_uring_sqe *sqe,
21 const char *oldpath,
22 const char *newpath,
23 int flags);
24
26 The io_uring_prep_linkat(3) function prepares a linkat request. The
27 submission queue entry sqe is setup to use the old directory file de‐
28 scriptor pointed to by olddirfd and old path pointed to by oldpath with
29 the new directory file descriptor pointed to by newdirfd and the new
30 path pointed to by newpath and using the specified flags in flags.
31
32 The io_uring_prep_link(3) function prepares a link request. The submis‐
33 sion queue entry sqe is setup to use the old path pointed to by oldpath
34 and the new path pointed to by newpath, both relative to the current
35 working directory and using the specified flags in flags.
36
37 These functions prepare an async linkat(2) or link(2) request. See
38 those man pages for details.
39
40
42 None
43
45 The CQE res field will contain the result of the operation. See the re‐
46 lated man page for details on possible values. Note that where synchro‐
47 nous system calls will return -1 on failure and set errno to the actual
48 error value, io_uring never uses errno. Instead it returns the negated
49 errno directly in the CQE res field.
50
52 As with any request that passes in data in a struct, that data must re‐
53 main valid until the request has been successfully submitted. It need
54 not remain valid until completion. Once a request has been submitted,
55 the in-kernel state is stable. Very early kernels (5.4 and earlier) re‐
56 quired state to be stable until the completion occurred. Applications
57 can test for this behavior by inspecting the IORING_FEAT_SUBMIT_STABLE
58 flag passed back from io_uring_queue_init_params(3).
59
61 io_uring_get_sqe(3), io_uring_submit(3), linkat(2), link(2)
62
63
64
65liburing-2.2 March 13, 2022 io_uring_prep_linkat(3)