From: Xuehan Xu Date: Sun, 31 Aug 2025 14:01:43 +0000 (+0800) Subject: crimson/osd/pg_backend: tolerate enoent on head in rollback X-Git-Tag: testing/wip-vshankar-testing-20250924.134331-debug~22^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=07abf0a95e633fead55a7e79a4f6ec3668efebfd;p=ceph-ci.git crimson/osd/pg_backend: tolerate enoent on head in rollback Currently when rolling back, we tolerate a missing clone (enoent) or a missing snapshot by removing the head. However, we should also tolerate the case where the head is missing when trying to remove it. Fixes: https://tracker.ceph.com/issues/72790 Signed-off-by: Xuehan Xu --- diff --git a/src/crimson/osd/pg_backend.cc b/src/crimson/osd/pg_backend.cc index 7abf8372c6c..cec03d3c20e 100644 --- a/src/crimson/osd/pg_backend.cc +++ b/src/crimson/osd/pg_backend.cc @@ -833,7 +833,14 @@ PGBackend::rollback_iertr::future<> PGBackend::rollback( " because got ENOENT|whiteout on obc lookup", os.oi.soid, snapid); return remove(os, txn, osd_op_params, delta_stats, - should_whiteout(ss, snapc), os.oi.size); + should_whiteout(ss, snapc), os.oi.size + ).handle_error_interruptible( + crimson::ct_error::enoent::handle([] { + // We consider rolling back a non-existing head to + // non-existing clone as a no-op. + return rollback_iertr::now(); + }) + ); }), rollback_ertr::pass_further{}, crimson::ct_error::assert_all{"unexpected error in rollback"}