]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: add creation time information into bucket stats 30384/head
authorEnming Zhang <zvampirem77@gmail.com>
Sat, 14 Sep 2019 07:36:13 +0000 (00:36 -0700)
committerEnming Zhang <zvampirem77@gmail.com>
Sun, 15 Sep 2019 07:04:36 +0000 (00:04 -0700)
Signed-off-by: Enming Zhang <zvampirem77@gmail.com>
src/rgw/rgw_bucket.cc

index c7b65fef57832e5b8a23ac02f3252b2afbeb354f..df822339b46711b63439812e12b5ec7269796ce1 100644 (file)
@@ -1317,6 +1317,7 @@ static int bucket_stats(RGWRadosStore *store, const std::string& tenant_name, st
   }
 
   utime_t ut(mtime);
+  utime_t ctime_ut(bucket_info.creation_time);
 
   formatter->open_object_section("stats");
   formatter->dump_string("bucket", bucket.name);
@@ -1331,6 +1332,7 @@ static int bucket_stats(RGWRadosStore *store, const std::string& tenant_name, st
   formatter->dump_string("ver", bucket_ver);
   formatter->dump_string("master_ver", master_ver);
   ut.gmtime(formatter->dump_stream("mtime"));
+  ctime_ut.gmtime(formatter->dump_stream("creation_time"));
   formatter->dump_string("max_marker", max_marker);
   dump_bucket_usage(stats, formatter);
   encode_json("bucket_quota", bucket_info.quota, formatter);