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

NAME

6       io_uring_prep_write_fixed  -  prepare I/O write request with registered
7       buffer
8

SYNOPSIS

10       #include <liburing.h>
11
12       void io_uring_prep_write_fixed(struct io_uring_sqe *sqe,
13                               int fd,
14                               const void *buf,
15                               unsigned nbytes,
16                               __u64 offset,
17                               int buf_index);
18

DESCRIPTION

20       The io_uring_prep_write_fixed(3) prepares an IO write  request  with  a
21       previously  registered  IO  buffer.  The  submission queue entry sqe is
22       setup to use the file descriptor fd to start writing  nbytes  from  the
23       buffer  buf  at  the  specified offset and with the buffer matching the
24       registered index of buf_index.
25
26       This works just like io_uring_prep_write(3) except it requires the  use
27       of buffers that have been registered with io_uring_register_buffers(3).
28       The buf and nbytes arguments must fall within  a  region  specified  by
29       buf_index  in  the previously registered buffer. The buffer need not be
30       aligned with the start of the registered buffer.
31
32       After the read has been prepared it can be submitted with  one  of  the
33       submit functions.
34
35

RETURN VALUE

37       None
38

ERRORS

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

SEE ALSO

47       io_uring_prep_write(3), io_uring_register_buffers(3)
48
49
50
51liburing-2.1                   February 13, 2022        io_uring_prep_write(3)
Impressum