1io_uring_prep_renameat(3)       liburing Manual      io_uring_prep_renameat(3)
2
3
4

NAME

6       io_uring_prep_renameat - prepare a renameat request
7

SYNOPSIS

9       #include <fcntl.h>
10       #include <stdio.h>
11       #include <liburing.h>
12
13       void io_uring_prep_renameat(struct io_uring_sqe *sqe,
14                                   int olddirfd,
15                                   const char *oldpath,
16                                   int newdirfd,
17                                   const char *newpath,
18                                   unsigned int flags);
19
20       void io_uring_prep_rename(struct io_uring_sqe *sqe,
21                                 const char *oldpath,
22                                 const char *newpath,
23                                 unsigned int flags);
24

DESCRIPTION

26       The io_uring_prep_renameat(3) function prepares a renameat 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_rename(3)  function  prepares  a rename request. The
33       submission queue entry sqe is setup to use the old path pointed  to  by
34       oldpath  with  the new path pointed to by newpath, both relative to the
35       current working directory and using the specified flags in flags.
36
37       These functions prepare an async renameat2(2) or rename(2) request.  If
38       flags  is  zero,  then  this  call is similar to the renameat(2) system
39       call. See those man pages for details.
40
41

RETURN VALUE

43       None
44

ERRORS

46       The CQE res field will contain the result of the operation. See the re‐
47       lated man page for details on possible values. Note that where synchro‐
48       nous system calls will return -1 on failure and set errno to the actual
49       error value, io_uring never uses errno.  Instead it returns the negated
50       errno directly in the CQE res field.
51

NOTES

53       As with any request that passes in data in a struct, that data must re‐
54       main  valid  until the request has been successfully submitted. It need
55       not remain valid until completion. Once a request has  been  submitted,
56       the in-kernel state is stable. Very early kernels (5.4 and earlier) re‐
57       quired state to be stable until the completion  occurred.  Applications
58       can  test for this behavior by inspecting the IORING_FEAT_SUBMIT_STABLE
59       flag passed back from io_uring_queue_init_params(3).
60

SEE ALSO

62       io_uring_get_sqe(3), io_uring_submit(3), renameat(2), renameat2(2), re‐
63       name(2)
64
65
66
67liburing-2.2                    March 13, 2022       io_uring_prep_renameat(3)
Impressum