upgpkg: ufw 0.36.2-1
[ArchLinux/community.git] / ceph / trunk / ceph-15.2.4-system-uring.patch
blob64df81bf97b5df724ae06c0c84fa83579a117459
1 diff --git a/src/os/CMakeLists.txt b/src/os/CMakeLists.txt
2 index 760244b9b4..7f83923671 100644
3 --- a/src/os/CMakeLists.txt
4 +++ b/src/os/CMakeLists.txt
5 @@ -134,27 +134,6 @@ if(WITH_EVENTTRACE)
6 endif()
8 if(WITH_LIBURING)
9 - include(ExternalProject)
10 - if("${CMAKE_GENERATOR}" MATCHES "Make")
11 - set(make_cmd "$(MAKE)")
12 - else()
13 - set(make_cmd "make")
14 - endif()
15 - ExternalProject_Add(liburing_ext
16 - DOWNLOAD_DIR ${CMAKE_BINARY_DIR}/src/
17 - GIT_REPOSITORY http://git.kernel.dk/liburing
18 - GIT_TAG "4e360f71131918c36774f51688e5c65dea8d43f2"
19 - SOURCE_DIR ${CMAKE_BINARY_DIR}/src/liburing
20 - CONFIGURE_COMMAND <SOURCE_DIR>/configure
21 - BUILD_COMMAND env CC=${CMAKE_C_COMPILER} ${make_cmd} -C src -s
22 - BUILD_IN_SOURCE 1
23 - INSTALL_COMMAND "")
24 - unset(make_cmd)
25 - add_library(liburing STATIC IMPORTED GLOBAL)
26 - add_dependencies(liburing liburing_ext)
27 - set_target_properties(liburing PROPERTIES
28 - IMPORTED_LINK_INTERFACE_LANGUAGES "C"
29 - IMPORTED_LOCATION "${CMAKE_BINARY_DIR}/src/liburing/src/liburing.a")
30 - target_link_libraries(os liburing)
31 - target_include_directories(os SYSTEM PRIVATE "${CMAKE_BINARY_DIR}/src/liburing/src/include")
32 + pkg_check_modules(LIBURING REQUIRED IMPORTED_TARGET liburing)
33 + target_link_libraries(os uring)
34 endif(WITH_LIBURING)
35 diff --git a/src/os/bluestore/io_uring.cc b/src/os/bluestore/io_uring.cc
36 index 54fa0f9535..4ba83cf172 100644
37 --- a/src/os/bluestore/io_uring.cc
38 +++ b/src/os/bluestore/io_uring.cc
39 @@ -7,6 +7,8 @@
41 #include "liburing.h"
42 #include <sys/epoll.h>
43 +#include <unistd.h>
44 +#include <sys/syscall.h>
46 /* Options */
48 @@ -134,8 +136,7 @@ int ioring_queue_t::init(std::vector<int> &fds)
49 if (ret < 0)
50 return ret;
52 - ret = io_uring_register(d->io_uring.ring_fd, IORING_REGISTER_FILES,
53 - &fds[0], fds.size());
54 + ret = io_uring_register_files(&d->io_uring, &fds[0], fds.size());
55 if (ret < 0) {
56 ret = -errno;
57 goto close_ring_fd;
58 @@ -214,7 +215,7 @@ bool ioring_queue_t::supported()
59 struct io_uring_params p;
61 memset(&p, 0, sizeof(p));
62 - int fd = io_uring_setup(16, &p);
63 + int fd = syscall(SYS_io_uring_setup, 16, &p);
64 if (fd < 0)
65 return false;