Fixes: https://tracker.ceph.com/issues/68195
Signed-off-by: Andrei Ivashchenko <aiivashchenko@users.noreply.github.com>
(cherry picked from commit
24984b704f0482bfbe09dc82d373fe40cc897c29)
Conflicts:
src/rgw/rgw_rest_swift.cc
dump_bucket_entry in reef uses rgw::sal::Bucket, while upstream uses RGWBucketEnt
rgw::sal::Bucket passed as const, not allowing to call get_modification_time, as it returns reference to ceph::real_time
src/rgw/services/svc_bucket_sobj.cc
read_bucket_info signature in reef has ctx agrument, while upstream hasn't
size_t size;
size_t size_rounded;
ceph::real_time creation_time;
+ ceph::real_time modification_time;
uint64_t count;
/* The placement_rule is necessary to calculate per-storage-policy statics
}
}
-void RGWListBuckets_ObjStore_SWIFT::dump_bucket_entry(const rgw::sal::Bucket& bucket)
+void RGWListBuckets_ObjStore_SWIFT::dump_bucket_entry(rgw::sal::Bucket& bucket)
{
s->formatter->open_object_section("container");
s->formatter->dump_string("name", bucket.get_name());
if (need_stats) {
s->formatter->dump_int("count", bucket.get_count());
s->formatter->dump_int("bytes", bucket.get_size());
+ dump_time(s, "last_modified", bucket.get_modification_time());
}
s->formatter->close_section();
const DoutPrefixProvider *dpp)
{
RGWBucketInfo bucket_info;
- int ret = read_bucket_info(ctx, bucket, &bucket_info, nullptr, nullptr, boost::none, y, dpp);
+ int ret = read_bucket_info(ctx, bucket, &bucket_info, &ent->modification_time, nullptr, boost::none, y, dpp);
if (ret < 0) {
return ret;
}