From ffb4691c78d8c7c861935747e1ebae8a6d33fb69 Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Mon, 21 Sep 2015 20:22:40 -0700 Subject: [PATCH] rgw: s/obj_manifest/dlo_manifest Be more clear, as slo_manifest will come later. Signed-off-by: Yehuda Sadeh Signed-off-by: Radoslaw Zarzynski Conflicts: src/rgw/rgw_op.cc --- src/rgw/rgw_op.cc | 22 +++++++++++----------- src/rgw/rgw_op.h | 8 ++++---- src/rgw/rgw_rest_swift.cc | 4 ++-- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/rgw/rgw_op.cc b/src/rgw/rgw_op.cc index dce18d110b161..fdc51db7707d2 100644 --- a/src/rgw/rgw_op.cc +++ b/src/rgw/rgw_op.cc @@ -1857,17 +1857,17 @@ static void encode_delete_at_attr(time_t delete_at, map& att attrs[RGW_ATTR_DELETE_AT] = delatbl; } -static int encode_obj_manifest_attr(const char * const obj_manifest, +static int encode_dlo_manifest_attr(const char * const dlo_manifest, map& attrs) { - string om = obj_manifest; + string dm = dlo_manifest; - if (om.find('/') == string::npos) { + if (dm.find('/') == string::npos) { return -EINVAL; } bufferlist manifest_bl; - manifest_bl.append(obj_manifest, strlen(obj_manifest) + 1); + manifest_bl.append(dlo_manifest, strlen(dlo_manifest) + 1); attrs[RGW_ATTR_USER_MANIFEST] = manifest_bl; return 0; @@ -1887,7 +1887,7 @@ void RGWPutObj::execute() map::iterator iter; bool multipart; - bool need_calc_md5 = (obj_manifest == NULL); + bool need_calc_md5 = (dlo_manifest == NULL); perfcounter->inc(l_rgw_put); @@ -2037,10 +2037,10 @@ void RGWPutObj::execute() attrs[RGW_ATTR_ACL] = aclbl; - if (obj_manifest) { - ret = encode_obj_manifest_attr(obj_manifest, attrs); + if (dlo_manifest) { + ret = encode_dlo_manifest_attr(dlo_manifest, attrs); if (ret < 0) { - ldout(s->cct, 0) << "bad user manifest: " << obj_manifest << dendl; + ldout(s->cct, 0) << "bad user manifest: " << dlo_manifest << dendl; goto done; } } @@ -2448,10 +2448,10 @@ void RGWPutMetadataObject::execute() populate_with_generic_attrs(s, attrs); encode_delete_at_attr(delete_at, attrs); - if (obj_manifest) { - ret = encode_obj_manifest_attr(obj_manifest, attrs); + if (dlo_manifest) { + ret = encode_dlo_manifest_attr(dlo_manifest, attrs); if (ret < 0) { - ldout(s->cct, 0) << "bad user manifest: " << obj_manifest << dendl; + ldout(s->cct, 0) << "bad user manifest: " << dlo_manifest << dendl; return; } } diff --git a/src/rgw/rgw_op.h b/src/rgw/rgw_op.h index 8046f346022b0..e8cda13d2173f 100644 --- a/src/rgw/rgw_op.h +++ b/src/rgw/rgw_op.h @@ -439,7 +439,7 @@ protected: string etag; bool chunked_upload; RGWAccessControlPolicy policy; - const char *obj_manifest; + const char *dlo_manifest; time_t mtime; uint64_t olh_epoch; @@ -456,7 +456,7 @@ public: if_match = NULL; if_nomatch = NULL; chunked_upload = false; - obj_manifest = NULL; + dlo_manifest = NULL; mtime = 0; olh_epoch = 0; delete_at = 0; @@ -592,13 +592,13 @@ protected: RGWAccessControlPolicy policy; string placement_rule; time_t delete_at; - const char *obj_manifest; + const char *dlo_manifest; public: RGWPutMetadataObject() : ret(0), delete_at(0), - obj_manifest(NULL) + dlo_manifest(NULL) {} virtual void init(RGWRados *store, struct req_state *s, RGWHandler *h) { diff --git a/src/rgw/rgw_rest_swift.cc b/src/rgw/rgw_rest_swift.cc index a7ad0603bf65f..e4fad79a249de 100644 --- a/src/rgw/rgw_rest_swift.cc +++ b/src/rgw/rgw_rest_swift.cc @@ -558,7 +558,7 @@ int RGWPutObj_ObjStore_SWIFT::get_params() policy.create_default(s->user.user_id, s->user.display_name); - obj_manifest = s->info.env->get("HTTP_X_OBJECT_MANIFEST"); + dlo_manifest = s->info.env->get("HTTP_X_OBJECT_MANIFEST"); int r = get_delete_at_param(s, &delete_at); if (r < 0) { @@ -679,7 +679,7 @@ int RGWPutMetadataObject_ObjStore_SWIFT::get_params() } placement_rule = s->info.env->get("HTTP_X_STORAGE_POLICY", ""); - obj_manifest = s->info.env->get("HTTP_X_OBJECT_MANIFEST"); + dlo_manifest = s->info.env->get("HTTP_X_OBJECT_MANIFEST"); return 0; } -- 2.39.5