From: myoungwon oh Date: Sun, 21 Feb 2021 06:09:24 +0000 (+0900) Subject: osd: fix when calling rollback from manifest object to normal object X-Git-Tag: v17.1.0~2307^2~23 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a050a9a62dfb96efc4d9a9d7a237d9d2f43a25f4;p=ceph.git 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 --- diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc index d155fae1b2e6..f8f67fde35fe 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(