From: myoungwon oh Date: Tue, 15 May 2018 08:45:08 +0000 (+0900) Subject: osd: set has_reference flag when need_reference is set X-Git-Tag: v14.0.1~1185^2~1 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=e22c00b659faaffa7ab5b49c48747cfd7449c1ef;p=ceph.git osd: set has_reference flag when need_reference is set Signed-off-by: Myoungwon Oh --- diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc index f402e4518df79..769133244cad8 100644 --- a/src/osd/PrimaryLogPG.cc +++ b/src/osd/PrimaryLogPG.cc @@ -6810,6 +6810,9 @@ int PrimaryLogPG::do_osd_ops(OpContext *ctx, vector& ops) const string& name = iter->first; t->rmattr(soid, name); } + if (!has_reference && need_reference) { + oi.set_flag(object_info_t::FLAG_REDIRECT_HAS_REFERENCE); + } dout(10) << "set-redirect oid:" << oi.soid << " user_version: " << oi.user_version << dendl; if (op_finisher) { ctx->op_finishers.erase(ctx->current_osd_subop_num); @@ -6908,6 +6911,10 @@ int PrimaryLogPG::do_osd_ops(OpContext *ctx, vector& ops) ctx->delta_stats.num_objects_manifest++; oi.set_flag(object_info_t::FLAG_MANIFEST); oi.manifest.type = object_manifest_t::TYPE_CHUNKED; + if (!has_reference && need_reference) { + oi.manifest.chunk_map[src_offset].flags |= + chunk_info_t::FLAG_HAS_REFERENCE; + } ctx->modify = true; dout(10) << "set-chunked oid:" << oi.soid << " user_version: " << oi.user_version