From efd89f9beb77bf8d93220ffdad7af834d0bc0be6 Mon Sep 17 00:00:00 2001 From: myoungwon oh Date: Thu, 1 Apr 2021 09:59:22 +0900 Subject: [PATCH] osd: do not assert() in the case of no obc Upon rollback, we should handle ENOENT case, so what we should do here is to return NOOP. Signed-off-by: Myoungwon Oh --- src/osd/PrimaryLogPG.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc index c0968d0083470..c7d9a469aa179 100644 --- a/src/osd/PrimaryLogPG.cc +++ b/src/osd/PrimaryLogPG.cc @@ -2468,7 +2468,11 @@ PrimaryLogPG::cache_result_t PrimaryLogPG::maybe_handle_manifest_detail( bool write_ordered, ObjectContextRef obc) { - ceph_assert(obc); + if (!obc) { + dout(20) << __func__ << ": no obc " << dendl; + return cache_result_t::NOOP; + } + if (!obc->obs.oi.has_manifest()) { dout(20) << __func__ << ": " << obc->obs.oi.soid << " is not manifest object " << dendl; -- 2.39.5