Skip to content

Commit b0f2547

Browse files
authored
Merge pull request ceph#65317 from xxhdx1985126/wip-72790
crimson/osd/pg_backend: tolerate enoent for both head and clone when doing rollback Reviewed-by: Matan Breizman <[email protected]>
2 parents 1d48534 + 07abf0a commit b0f2547

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/crimson/osd/pg_backend.cc

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -833,7 +833,14 @@ PGBackend::rollback_iertr::future<> PGBackend::rollback(
833833
" because got ENOENT|whiteout on obc lookup",
834834
os.oi.soid, snapid);
835835
return remove(os, txn, osd_op_params, delta_stats,
836-
should_whiteout(ss, snapc), os.oi.size);
836+
should_whiteout(ss, snapc), os.oi.size
837+
).handle_error_interruptible(
838+
crimson::ct_error::enoent::handle([] {
839+
// We consider rolling back a non-existing head to
840+
// non-existing clone as a no-op.
841+
return rollback_iertr::now();
842+
})
843+
);
837844
}),
838845
rollback_ertr::pass_further{},
839846
crimson::ct_error::assert_all{"unexpected error in rollback"}

0 commit comments

Comments
 (0)