From 78b6005865895b85b28f5e09454ed71d5cd390d3 Mon Sep 17 00:00:00 2001 From: Shilpa Jagannath Date: Thu, 4 Jun 2026 13:52:57 -0400 Subject: [PATCH] rgw: fix log_remove spurious -EIO on non-existent FIFO shards the shared error code `ec` was not cleared before continuing past a non-existent shard (ENOENT from get_meta). and if the last shard returned ENOENT, `ec` retained that value and the fired EIO even though all shards were cleanly removed. also switch to sys::system_error(ec) to preserve the real errno Signed-off-by: Shilpa Jagannath --- src/rgw/driver/rados/rgw_log_backing.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/rgw/driver/rados/rgw_log_backing.cc b/src/rgw/driver/rados/rgw_log_backing.cc index 8086372bb18f..8b543de17879 100644 --- a/src/rgw/driver/rados/rgw_log_backing.cc +++ b/src/rgw/driver/rados/rgw_log_backing.cc @@ -180,7 +180,10 @@ asio::awaitable log_remove( = co_await fifo::FIFO::get_meta(rados, oid, loc, std::nullopt, asio::redirect_error(asio::use_awaitable, ec)); - if (ec == sys::errc::no_such_file_or_directory) continue; + if (ec == sys::errc::no_such_file_or_directory) { + ec.clear(); + continue; + } if (!ec && info.head_part_num > -1) { for (auto j = info.tail_part_num; j <= info.head_part_num; ++j) { sys::error_code subec; @@ -219,8 +222,8 @@ asio::awaitable log_remove( << ": " << ec.message() << dendl; } } - if (ec) - throw sys::error_code(ec); + if (ec && ec != sys::errc::no_such_file_or_directory) + throw sys::system_error(ec); co_return; } -- 2.47.3