From: Casey Bodley Date: Thu, 29 Sep 2016 16:38:19 +0000 (-0400) Subject: rgw: Bucket::List::list_objects no longer reads compression attribute for size X-Git-Tag: v11.1.0~429^2~8 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=df64c45803f847dbda324132f63ea98e6795b25b;p=ceph.git rgw: Bucket::List::list_objects no longer reads compression attribute for size Signed-off-by: Casey Bodley --- diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index 59186d3e6057..fd13ba9e4607 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -5196,26 +5196,9 @@ int RGWRados::Bucket::List::list_objects(int max, vector *result, goto done; } - RGWObjEnt ent = eiter->second; - ent.key = obj; - ent.ns = ns; - rgw_obj cs_obj(bucket, obj); - bufferlist attr; - map attrset; - int y = store->raw_obj_stat(cs_obj, NULL, NULL, NULL, &attrset, NULL, NULL); - map::iterator cmp = attrset.find(RGW_ATTR_COMPRESSION); - if (!y && cmp != attrset.end()) { - RGWCompressionInfo cs_info; - bufferlist::iterator bliter = cmp->second.begin(); - try { - ::decode(cs_info, bliter); - } catch (buffer::error& err) { - ldout(cct, 20) << "Failed to get decompressed obj size" << dendl; - } - if (cs_info.compression_type != "none") - ent.size = cs_info.orig_size; - } - result->push_back(ent); + entry.key = obj; + entry.ns = ns; + result->emplace_back(std::move(entry)); count++; } @@ -11924,8 +11907,8 @@ int RGWRados::cls_bucket_list(rgw_bucket& bucket, int shard_id, rgw_obj_key& sta } } if (r >= 0) { - m[name] = e; ldout(cct, 10) << "RGWRados::cls_bucket_list: got " << e.key.name << "[" << e.key.instance << "]" << dendl; + m[name] = std::move(e); ++count; }