Fix iothreads sometimes hanging after adding zerocopy support

This commit is contained in:
Vitaliy Filippov
2025-05-23 20:54:03 +03:00
parent 0dd49c1d67
commit 2b0a802ea1
2 changed files with 4 additions and 2 deletions
+2
View File
@@ -35,6 +35,8 @@ void osd_messenger_t::read_requests()
ring_data_t data_local;
sqe_local.user_data = (uint64_t)&data_local;
io_uring_sqe* sqe = (iothread ? &sqe_local : ringloop->get_sqe());
if (iothread)
data_local = {};
if (!sqe)
{
cl->read_msg.msg_iovlen = 0;
+2 -2
View File
@@ -196,10 +196,10 @@ bool osd_messenger_t::try_send(osd_client_t *cl)
ring_data_t data_local;
sqe_local.user_data = (uint64_t)&data_local;
io_uring_sqe* sqe = (iothread ? &sqe_local : ringloop->get_sqe());
if (iothread)
data_local = {};
if (!sqe)
{
return false;
}
cl->write_msg.msg_iov = cl->send_list.data();
cl->write_msg.msg_iovlen = cl->send_list.size() < IOV_MAX ? cl->send_list.size() : IOV_MAX;
cl->refs++;