]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: fix when calling rollback from manifest object to normal object
authormyoungwon oh <ohmyoungwon@gmail.com>
Sun, 21 Feb 2021 06:09:24 +0000 (15:09 +0900)
committermyoungwon oh <ohmyoungwon@gmail.com>
Mon, 29 Mar 2021 08:17:11 +0000 (17:17 +0900)
do not invoke maybe_handle_manifest_detail if the object is not manifest

Signed-off-by: Myoungwon Oh <myoungwon.oh@samsung.com>
src/osd/PrimaryLogPG.cc

index d155fae1b2e6d520b667c8fc2943d28de6217928..f8f67fde35fe2629db44b67540ead809ff44d8a3 100644 (file)
@@ -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(