Also zero-init sqe

This commit is contained in:
Vitaliy Filippov
2025-05-23 21:18:37 +03:00
parent d3fde0569f
commit 4afb617f59
2 changed files with 6 additions and 2 deletions
+3 -1
View File
@@ -33,10 +33,12 @@ void osd_messenger_t::read_requests()
auto iothread = iothreads.size() ? iothreads[peer_fd % iothreads.size()] : NULL;
io_uring_sqe sqe_local;
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)
{
sqe_local = { .user_data = (uint64_t)&data_local };
data_local = {};
}
if (!sqe)
{
cl->read_msg.msg_iovlen = 0;
+3 -1
View File
@@ -194,10 +194,12 @@ bool osd_messenger_t::try_send(osd_client_t *cl)
auto iothread = iothreads.size() ? iothreads[peer_fd % iothreads.size()] : NULL;
io_uring_sqe sqe_local;
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)
{
sqe_local = { .user_data = (uint64_t)&data_local };
data_local = {};
}
if (!sqe)
return false;
cl->write_msg.msg_iov = cl->send_list.data();