From a050a9a62dfb96efc4d9a9d7a237d9d2f43a25f4 Mon Sep 17 00:00:00 2001 From: myoungwon oh Date: Sun, 21 Feb 2021 15:09:24 +0900 Subject: [PATCH] osd: fix when calling rollback from manifest object to normal object do not invoke maybe_handle_manifest_detail if the object is not manifest Signed-off-by: Myoungwon Oh --- src/osd/PrimaryLogPG.cc | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc index d155fae1b2e..f8f67fde35f 100644 --- a/src/osd/PrimaryLogPG.cc +++ b/src/osd/PrimaryLogPG.cc @@ -8191,11 +8191,16 @@ int PrimaryLogPG::_rollback_to(OpContext *ctx, ceph_osd_op& op) ObjectContextRef promote_obc; cache_result_t tier_mode_result; if (obs.exists && obs.oi.has_manifest()) { - tier_mode_result = - maybe_handle_manifest_detail( - ctx->op, - true, - rollback_to); + if (!rollback_to->obs.oi.has_manifest()) { + // rollback_to is not manifest object + tier_mode_result = cache_result_t::NOOP; + } else { + tier_mode_result = + maybe_handle_manifest_detail( + ctx->op, + true, + rollback_to); + } } else { tier_mode_result = maybe_handle_cache_detail( -- 2.47.3