Skip to content

Commit 3b5dc13

Browse files
authored
Merge pull request ceph#61157 from aiivashchenko/fix_68195
rgw: add missing last_modified field to swift api Reviewed-by: Casey Bodley <[email protected]>
2 parents f900942 + 24984b7 commit 3b5dc13

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
@@ -1428,6 +1428,7 @@ struct RGWBucketEnt {
14281428
size_t size;
14291429
size_t size_rounded;
14301430
ceph::real_time creation_time;
1431+
ceph::real_time modification_time;
14311432
uint64_t count;
14321433

14331434
/* 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)