]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgw/admin: 'bucket stats' displays non-empty mtime
authorCasey Bodley <cbodley@redhat.com>
Tue, 7 Mar 2023 22:49:44 +0000 (17:49 -0500)
committerCasey Bodley <cbodley@redhat.com>
Tue, 7 Mar 2023 23:14:00 +0000 (18:14 -0500)
Fixes: https://tracker.ceph.com/issues/58932
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/driver/rados/rgw_bucket.cc

index 90f5c21c4ef67410e343e286750f63bc780355e8..70e5581b1f122ba1a5414edda7fc3af7cdccf7fa 100644 (file)
@@ -870,7 +870,6 @@ static int bucket_stats(rgw::sal::Driver* driver,
   std::unique_ptr<rgw::sal::Bucket> bucket;
   map<RGWObjCategory, RGWStorageStats> stats;
 
-  real_time mtime;
   int ret = driver->get_bucket(dpp, nullptr, tenant_name, bucket_name, &bucket, null_yield);
   if (ret < 0) {
     return ret;
@@ -891,7 +890,7 @@ static int bucket_stats(rgw::sal::Driver* driver,
     return ret;
   }
 
-  utime_t ut(mtime);
+  utime_t ut(bucket->get_modification_time());
   utime_t ctime_ut(bucket->get_creation_time());
 
   formatter->open_object_section("stats");