From: Shilpa Jagannath Date: Thu, 4 Jun 2026 17:52:57 +0000 (-0400) Subject: rgw: fix log_remove spurious -EIO on non-existent FIFO shards X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F69293%2Fhead;p=ceph.git 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 --- 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; }