]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix log_remove spurious -EIO on non-existent FIFO shards 69293/head
authorShilpa Jagannath <smanjara@redhat.com>
Thu, 4 Jun 2026 17:52:57 +0000 (13:52 -0400)
committerShilpa Jagannath <smanjara@redhat.com>
Thu, 4 Jun 2026 17:52:57 +0000 (13:52 -0400)
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 <smanjara@redhat.com>
src/rgw/driver/rados/rgw_log_backing.cc

index 8086372bb18fc38dc0528312618f67b6d71221fa..8b543de178790fb3d164d4262f7eef320144b25b 100644 (file)
@@ -180,7 +180,10 @@ asio::awaitable<void> 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<void> 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;
 }