]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: drop the reference if redirect has the reference
authormyoungwon oh <ohmyoungwon@gmail.com>
Sun, 9 Aug 2020 11:31:02 +0000 (20:31 +0900)
committermyoungwon oh <ohmyoungwon@gmail.com>
Tue, 18 Aug 2020 16:38:50 +0000 (01:38 +0900)
Signed-off-by: Myoungwon Oh <myoungwon.oh@samsumg.com>
src/osd/PrimaryLogPG.cc

index 90f04258ac7f31ae48c28b9f0180a9c7b17eb445..82c9c420aa6825f68d07a27d29c9af583b3e2637 100644 (file)
@@ -3568,16 +3568,14 @@ void PrimaryLogPG::dec_all_refcount_manifest(const object_info_t& oi, OpContext*
          dec_refcount(soid, refs);
        });
     }
-  } else if (oi.manifest.is_redirect()) {
-    ceph_assert(oi.flags & object_info_t::FLAG_REDIRECT_HAS_REFERENCE);
+  } else if (oi.manifest.is_redirect() && 
+            oi.test_flag(object_info_t::FLAG_REDIRECT_HAS_REFERENCE)) {
     ctx->register_on_commit(
       [oi, this](){
        refcount_manifest(oi.soid, oi.manifest.redirect_target, 
                          refcount_t::DECREMENT_REF, NULL);
       });
-  } else {
-    ceph_abort_msg("unrecognized manifest type");
-  }
+  } 
 }
 
 void PrimaryLogPG::refcount_manifest(hobject_t src_soid, hobject_t tgt_soid, refcount_t type,