1io_uring_register_file_alloc_ranglei(b3u)ring Miaon_uuarling_register_file_alloc_range(3)
2
3
4
6 io_uring_register_file_alloc_range - set range for fixed file alloca‐
7 tions
8
10 #include <liburing.h>
11
12 int io_uring_register_file_alloc_range(struct io_uring *ring,
13 unsigned off,
14 unsigned len);
15
16
18 The io_uring_register_file_alloc_range(3) function sets the allowable
19 range for fixed file index allocations within the kernel. When requests
20 that can instantiate a new fixed file are used with IORING_FILE_IN‐
21 DEX_ALLOC , the application is asking the kernel to allocate a new
22 fixed file descriptor rather than pass in a specific value for one. By
23 default, the kernel will pick any available fixed file descriptor
24 within the range available. Calling this function with off set to the
25 starting offset and len set to the number of descriptors, the applica‐
26 tion can limit the allocated descriptors to that particular range. This
27 effectively allows the application to set aside a range just for dy‐
28 namic allocations, with the remainder being used for specific values.
29
30 The application must have registered a fixed file table upfront, eg
31 through io_uring_register_files(3) or io_uring_regis‐
32 ter_files_sparse(3).
33
34 Available since 6.0.
35
36
38 On success io_uring_register_buf_ring(3) returns 0. On failure it re‐
39 turns -errno.
40
42 io_uring_register_files(3) io_uring_prep_accept_direct(3) io_ur‐
43 ing_prep_openat_direct(3) io_uring_prep_socket_direct(3)
44
45
46
47liburing-2.3 Oct 21, 2i0o2_2uring_register_file_alloc_range(3)