From: myoungwon oh Date: Thu, 23 Aug 2018 07:00:01 +0000 (+0900) Subject: osd: add fingerprint property X-Git-Tag: v14.0.1~340^2~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c897267af653d30bc6dcd7abe8fbcf454371948c;p=ceph.git osd: add fingerprint property Signed-off-by: Myoungwon Oh --- diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc index c81562fc405d..f5eb85cec342 100644 --- a/src/osd/PrimaryLogPG.cc +++ b/src/osd/PrimaryLogPG.cc @@ -6929,6 +6929,9 @@ int PrimaryLogPG::do_osd_ops(OpContext *ctx, vector& 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 diff --git a/src/osd/osd_types.h b/src/osd/osd_types.h index 5e11a0f2a187..173a21387058 100644 --- a/src/osd/osd_types.h +++ b/src/osd/osd_types.h @@ -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;