]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: add fingerprint property
authormyoungwon oh <omwmw@sk.com>
Thu, 23 Aug 2018 07:00:01 +0000 (16:00 +0900)
committermyoungwon oh <omwmw@sk.com>
Sun, 2 Sep 2018 03:22:27 +0000 (12:22 +0900)
Signed-off-by: Myoungwon Oh <omwmw@sk.com>
src/osd/PrimaryLogPG.cc
src/osd/osd_types.h

index c81562fc405d556384d608ab25e9c72c0890e829..f5eb85cec342e18372c910d1eba46b81c72b1889 100644 (file)
@@ -6929,6 +6929,9 @@ int PrimaryLogPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
            oi.manifest.chunk_map[src_offset].flags |=
              chunk_info_t::FLAG_HAS_REFERENCE;
          }
+         if (need_reference && pool.info.get_fingerprint_type() != pg_pool_t::TYPE_FINGERPRINT_NONE) {
+           oi.manifest.chunk_map[src_offset].flags |= chunk_info_t::FLAG_HAS_FINGERPRINT;
+         }
          ctx->modify = true;
 
          dout(10) << "set-chunked oid:" << oi.soid << " user_version: " << oi.user_version 
index 5e11a0f2a187539a585a7d0c001feb2390f129ad..173a21387058444e6569c3dce961381472d96096 100644 (file)
@@ -4609,6 +4609,7 @@ struct chunk_info_t {
     FLAG_DIRTY = 1, 
     FLAG_MISSING = 2,
     FLAG_HAS_REFERENCE = 4,
+    FLAG_HAS_FINGERPRINT = 8,
   };
   uint32_t offset;
   uint32_t length;
@@ -4628,6 +4629,9 @@ struct chunk_info_t {
     if (flags & FLAG_HAS_REFERENCE) {
       r += "|has_reference";
     }
+    if (flags & FLAG_HAS_FINGERPRINT) {
+      r += "|has_fingerprint";
+    }
     if (r.length())
       return r.substr(1);
     return r;