diff options
author | Andrei Ivashchenko <aiivashchenko@users.noreply.github.com> | 2024-12-20 15:09:50 +0100 |
---|---|---|
committer | Andrei Ivashchenko <aiivashchenko@users.noreply.github.com> | 2024-12-23 15:38:36 +0100 |
commit | 24984b704f0482bfbe09dc82d373fe40cc897c29 (patch) | |
tree | 1e2ffd4f86bdf4072a901be554818a2a73b17033 | |
parent | Merge pull request #60777 from VallariAg/wip-nvmeof-prometheus-rbd-image-reused (diff) | |
download | ceph-24984b704f0482bfbe09dc82d373fe40cc897c29.tar.xz ceph-24984b704f0482bfbe09dc82d373fe40cc897c29.zip |
rgw: add missing last_modified field to swift api
Fixes: https://tracker.ceph.com/issues/68195
Signed-off-by: Andrei Ivashchenko <aiivashchenko@users.noreply.github.com>
-rw-r--r-- | src/rgw/rgw_common.h | 1 | ||||
-rw-r--r-- | src/rgw/rgw_rest_swift.cc | 1 | ||||
-rw-r--r-- | src/rgw/services/svc_bucket_sobj.cc | 2 |
3 files changed, 3 insertions, 1 deletions
diff --git a/src/rgw/rgw_common.h b/src/rgw/rgw_common.h index 8dafe147509..d7b0819d356 100644 --- a/src/rgw/rgw_common.h +++ b/src/rgw/rgw_common.h @@ -1426,6 +1426,7 @@ struct RGWBucketEnt { 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 diff --git a/src/rgw/rgw_rest_swift.cc b/src/rgw/rgw_rest_swift.cc index b8ff3ca2fe8..88af0fc9c27 100644 --- a/src/rgw/rgw_rest_swift.cc +++ b/src/rgw/rgw_rest_swift.cc @@ -361,6 +361,7 @@ void RGWListBuckets_ObjStore_SWIFT::dump_bucket_entry(const RGWBucketEnt& ent) if (need_stats) { s->formatter->dump_int("count", ent.count); s->formatter->dump_int("bytes", ent.size); + dump_time(s, "last_modified", ent.modification_time); } s->formatter->close_section(); diff --git a/src/rgw/services/svc_bucket_sobj.cc b/src/rgw/services/svc_bucket_sobj.cc index ca705c5a44d..0f4cd4e847b 100644 --- a/src/rgw/services/svc_bucket_sobj.cc +++ b/src/rgw/services/svc_bucket_sobj.cc @@ -556,7 +556,7 @@ int RGWSI_Bucket_SObj::read_bucket_stats(const rgw_bucket& bucket, const DoutPrefixProvider *dpp) { RGWBucketInfo bucket_info; - int ret = read_bucket_info(bucket, &bucket_info, nullptr, nullptr, boost::none, y, dpp); + int ret = read_bucket_info(bucket, &bucket_info, &ent->modification_time, nullptr, boost::none, y, dpp); if (ret < 0) { return ret; } |