std::string ns;
rgw_user owner;
std::string owner_display_name;
- uint64_t size;
+ uint64_t size{0};
+ uint64_t accounted_size{0};
ceph::real_time mtime;
string etag;
string content_type;
uint32_t flags;
uint64_t versioned_epoch;
- RGWObjEnt() : size(0), flags(0), versioned_epoch(0) {}
+ RGWObjEnt() : flags(0), versioned_epoch(0) {}
void dump(Formatter *f) const;
RGWObjEnt ent;
obj.get_index_key(&ent.key);
ent.size = size;
+ ent.accounted_size = size;
ent.mtime = ut;
ent.etag = etag;
ACLOwner owner;
ObjectWriteOperation o;
rgw_bucket_dir_entry_meta dir_meta;
dir_meta.size = ent.size;
- dir_meta.accounted_size = ent.size;
+ dir_meta.accounted_size = ent.accounted_size;
dir_meta.mtime = ent.mtime;
dir_meta.etag = ent.etag;
dir_meta.owner = ent.owner.to_str();
RGWObjEnt e;
e.key.set(dirent.key.name, dirent.key.instance);
e.size = dirent.meta.size;
+ e.accounted_size = dirent.meta.accounted_size;
e.mtime = dirent.meta.mtime;
e.etag = dirent.meta.etag;
e.owner = dirent.meta.owner;
ACLOwner owner;
object.size = astate->size;
+ object.accounted_size = astate->accounted_size;
object.mtime = astate->mtime;
map<string, bufferlist>::iterator iter = astate->attrset.find(RGW_ATTR_ETAG);
list_state.ver.pool = io_ctx.get_id();
list_state.ver.epoch = astate->epoch;
list_state.meta.size = object.size;
+ list_state.meta.accounted_size = object.accounted_size;
list_state.meta.mtime = object.mtime;
list_state.meta.category = main_category;
list_state.meta.etag = etag;
dump_time(s, "LastModified", &iter->mtime);
if (!iter->is_delete_marker()) {
s->formatter->dump_format("ETag", "\"%s\"", iter->etag.c_str());
- s->formatter->dump_int("Size", iter->size);
+ s->formatter->dump_int("Size", iter->accounted_size);
s->formatter->dump_string("StorageClass", "STANDARD");
}
dump_owner(s, iter->owner, iter->owner_display_name);
}
dump_time(s, "LastModified", &iter->mtime);
s->formatter->dump_format("ETag", "\"%s\"", iter->etag.c_str());
- s->formatter->dump_int("Size", iter->size);
+ s->formatter->dump_int("Size", iter->accounted_size);
s->formatter->dump_string("StorageClass", "STANDARD");
dump_owner(s, iter->owner, iter->owner_display_name);
if (s->system_request) {
s->formatter->open_object_section("object");
s->formatter->dump_string("name", key.name);
s->formatter->dump_string("hash", iter->etag);
- s->formatter->dump_int("bytes", iter->size);
+ s->formatter->dump_int("bytes", iter->accounted_size);
string single_content_type = iter->content_type;
if (iter->content_type.size()) {
// content type might hold multiple values, just dump the last one