Skip to content

Commit 24984b7

Browse files
committed
rgw: add missing last_modified field to swift api
Fixes: https://tracker.ceph.com/issues/68195 Signed-off-by: Andrei Ivashchenko <[email protected]>
1 parent 919c2a6 commit 24984b7

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

src/rgw/rgw_common.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1426,6 +1426,7 @@ struct RGWBucketEnt {
14261426
size_t size;
14271427
size_t size_rounded;
14281428
ceph::real_time creation_time;
1429+
ceph::real_time modification_time;
14291430
uint64_t count;
14301431

14311432
/* The placement_rule is necessary to calculate per-storage-policy statics

src/rgw/rgw_rest_swift.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,7 @@ void RGWListBuckets_ObjStore_SWIFT::dump_bucket_entry(const RGWBucketEnt& ent)
361361
if (need_stats) {
362362
s->formatter->dump_int("count", ent.count);
363363
s->formatter->dump_int("bytes", ent.size);
364+
dump_time(s, "last_modified", ent.modification_time);
364365
}
365366

366367
s->formatter->close_section();

src/rgw/services/svc_bucket_sobj.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@ int RGWSI_Bucket_SObj::read_bucket_stats(const rgw_bucket& bucket,
556556
const DoutPrefixProvider *dpp)
557557
{
558558
RGWBucketInfo bucket_info;
559-
int ret = read_bucket_info(bucket, &bucket_info, nullptr, nullptr, boost::none, y, dpp);
559+
int ret = read_bucket_info(bucket, &bucket_info, &ent->modification_time, nullptr, boost::none, y, dpp);
560560
if (ret < 0) {
561561
return ret;
562562
}

0 commit comments

Comments
 (0)