]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: return 0 early if fingerprint algorithm is not set
authormyoungwon oh <ohmyoungwon@gmail.com>
Fri, 6 Nov 2020 03:39:14 +0000 (12:39 +0900)
committermyoungwon oh <ohmyoungwon@gmail.com>
Fri, 6 Nov 2020 03:39:14 +0000 (12:39 +0900)
Signed-off-by: Myoungwon Oh <myoungwon.oh@samsumg.com>
src/osd/PrimaryLogPG.cc

index 4c2f801847794eb496b26486aa1e87ead9793607..38ce39087d631fdbfc23ea025f1f5cec49285a05 100644 (file)
@@ -10017,6 +10017,10 @@ int PrimaryLogPG::start_dedup(OpRequestRef op, ObjectContextRef obc)
     // evicted 
     return 0;
   }
+  if (pool.info.get_fingerprint_type() == pg_pool_t::TYPE_FINGERPRINT_NONE) {
+    dout(0) << " fingerprint algorithm is not set " << dendl;
+    return 0;
+  } 
 
   /*
    * The operations to make dedup chunks are tracked by a ManifestOp.
@@ -10040,10 +10044,6 @@ int PrimaryLogPG::start_dedup(OpRequestRef op, ObjectContextRef obc)
       bufferlist chunk;
       chunk.substr_of(bl, p.first, p.second);
       hobject_t target = get_fpoid_from_chunk(soid, chunk);
-      if (target == hobject_t()) {
-       dout(0) << " fingerprint oid is null " << dendl;
-       break;
-      }
 
       // skip if the same content exits in prev snap at same offset
       if (obc->ssc->snapset.clones.size()) {