From c8582ff27a6aa53575594b8a676f0d084e9c2325 Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Tue, 14 May 2019 22:11:05 +0800 Subject: [PATCH] rgw: simplify RGWObjTags dump Signed-off-by: Chang Liu --- src/rgw/rgw_json_enc.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/rgw/rgw_json_enc.cc b/src/rgw/rgw_json_enc.cc index 24211399acf1d..046f9294949ca 100644 --- a/src/rgw/rgw_json_enc.cc +++ b/src/rgw/rgw_json_enc.cc @@ -1667,12 +1667,11 @@ void RGWOrphanSearchState::dump(Formatter *f) const void RGWObjTags::dump(Formatter *f) const { + f->open_object_section("tagset"); for (auto& tag: tag_map){ - f->open_object_section("tag_map"); - f->dump_string("key", tag.first); - f->dump_string("value", tag.second); - f->close_section(); + f->dump_string(tag.first.c_str(), tag.second); } + f->close_section(); } void lc_op::dump(Formatter *f) const