File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5656
5757if liburing_dep.found()
5858 sources += ' nvme/uring.c'
59+ else
60+ sources += ' nvme/no-uring.c'
5961endif
6062
6163if host_system != ' windows'
Original file line number Diff line number Diff line change 1+ // SPDX-License-Identifier: LGPL-2.1-or-later
2+ /*
3+ * This file is part of libnvme.
4+ * Copyright (c) 2026 SUSE Software Solutions
5+ *
6+ * Authors: Daniel Wagner <[email protected] > 7+ */
8+
9+
10+ #include <errno.h>
11+
12+ #include <libnvme.h>
13+
14+ #include "private.h"
15+
16+ int libnvme_open_uring (struct libnvme_global_ctx * ctx )
17+ {
18+ return - ENOTSUP ;
19+ }
20+ void libnvme_close_uring (struct libnvme_global_ctx * ctx )
21+ {
22+ }
23+
24+ int __libnvme_transport_handle_open_uring (struct libnvme_transport_handle * hdl )
25+ {
26+ hdl -> ctx -> uring_state = LIBNVME_IO_URING_STATE_NOT_AVAILABLE ;
27+ return - ENOTSUP ;
28+ }
29+
30+ int libnvme_submit_admin_passthru_async (struct libnvme_transport_handle * hdl ,
31+ struct libnvme_passthru_cmd * cmd )
32+ {
33+ return - ENOTSUP ;
34+ }
35+
36+ int libnvme_wait_complete_passthru (struct libnvme_transport_handle * hdl )
37+ {
38+ return - ENOTSUP ;
39+ }
Original file line number Diff line number Diff line change 77 */
88#pragma once
99
10- #include <errno.h>
1110#include <ifaddrs.h>
1211#include <poll.h>
1312
@@ -743,39 +742,10 @@ void libnvme_ns_release_transport_handle(libnvme_ns_t n);
743742int libnvme_mi_admin_admin_passthru (struct libnvme_transport_handle * hdl ,
744743 struct libnvme_passthru_cmd * cmd );
745744
746- #ifdef CONFIG_LIBURING
747745int libnvme_open_uring (struct libnvme_global_ctx * ctx );
748746void libnvme_close_uring (struct libnvme_global_ctx * ctx );
749747int __libnvme_transport_handle_open_uring (struct libnvme_transport_handle * hdl );
750748int libnvme_submit_admin_passthru_async (struct libnvme_transport_handle * hdl ,
751749 struct libnvme_passthru_cmd * cmd );
752750int libnvme_wait_complete_passthru (struct libnvme_transport_handle * hdl );
753- #else
754- static inline int
755- libnvme_open_uring (struct libnvme_global_ctx * ctx )
756- {
757- return - ENOTSUP ;
758- }
759- static inline void
760- libnvme_close_uring (struct libnvme_global_ctx * ctx )
761- {
762- }
763- static inline int
764- __libnvme_transport_handle_open_uring (struct libnvme_transport_handle * hdl )
765- {
766- hdl -> ctx -> uring_state = LIBNVME_IO_URING_STATE_NOT_AVAILABLE ;
767- return - ENOTSUP ;
768- }
769- static inline int
770- libnvme_submit_admin_passthru_async (struct libnvme_transport_handle * hdl ,
771- struct libnvme_passthru_cmd * cmd )
772- {
773- return - ENOTSUP ;
774- }
775- static inline int
776- libnvme_wait_complete_passthru (struct libnvme_transport_handle * hdl )
777- {
778- return - ENOTSUP ;
779- }
780- #endif
781751
You can’t perform that action at this time.
0 commit comments