1io_uring_prep_read(3) liburing Manual io_uring_prep_read(3)
2
3
4
6 io_uring_prep_read_fixed - prepare I/O read request with registered
7 buffer
8
10 #include <liburing.h>
11
12 void io_uring_prep_read_fixed(struct io_uring_sqe *sqe,
13 int fd,
14 void *buf,
15 unsigned nbytes,
16 __u64 offset,
17 int buf_index);
18
20 The io_uring_prep_read_fixed(3) prepares an IO read request with a pre‐
21 viously registered IO buffer. The submission queue entry sqe is setup
22 to use the file descriptor fd to start reading nbytes into the buffer
23 buf at the specified offset, and with the buffer matching the regis‐
24 tered index of buf_index.
25
26 This works just like io_uring_prep_read(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
37 None
38
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
47 io_uring_prep_read(3), io_uring_register_buffers(3)
48
49
50
51liburing-2.1 February 13, 2022 io_uring_prep_read(3)