From 9c33de5e57207ea955a8c9aa5d5cf86e7b13ff92 Mon Sep 17 00:00:00 2001 From: Vitaliy Filippov Date: Tue, 3 Mar 2020 17:48:47 +0300 Subject: [PATCH] Test: use submit_and_wait() --- blockstore_impl.cpp | 5 ----- osd.cpp | 1 - ringloop.h | 3 +-- 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/blockstore_impl.cpp b/blockstore_impl.cpp index 7b7a43e5..8c548840 100644 --- a/blockstore_impl.cpp +++ b/blockstore_impl.cpp @@ -196,11 +196,6 @@ void blockstore_impl_t::loop() { flusher->loop(); } - int ret = ringloop->submit(); - if (ret < 0) - { - throw std::runtime_error(std::string("io_uring_submit: ") + strerror(-ret)); - } if ((initial_ring_space - ringloop->space_left()) > 0) { live = true; diff --git a/osd.cpp b/osd.cpp index e4b820ef..fd7a1837 100644 --- a/osd.cpp +++ b/osd.cpp @@ -175,7 +175,6 @@ void osd_t::loop() handle_peers(); read_requests(); send_replies(); - ringloop->submit(); } void osd_t::handle_epoll_events() diff --git a/ringloop.h b/ringloop.h index 4014cfb4..c23cabcc 100644 --- a/ringloop.h +++ b/ringloop.h @@ -146,8 +146,7 @@ public: } inline int wait() { - struct io_uring_cqe *cqe; - return io_uring_wait_cqe(&ring, &cqe); + return io_uring_submit_and_wait(&ring, 1); } inline unsigned space_left() {