From: weiqiaomiao Date: Mon, 4 Jul 2016 10:16:39 +0000 (+0800) Subject: rgw: for the create_bucket api, if the input creation_time is zero, we should set... X-Git-Tag: v10.2.6~73^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d1df8f71e89f5e74ee2e5c5f8c9a01a2d31a0e4e;p=ceph.git rgw: for the create_bucket api, if the input creation_time is zero, we should set it to 'now" Fixes: http://tracker.ceph.com/issues/16597 Signed-off-by: weiqiaomiao (cherry picked from commit 499c0e95a58bb7bd2326ea74761ea98449d26d3b) Conflicts: src/rgw/rgw_rados.cc - apply the one-liner patch manually --- diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index 134e7e56ea0..daddebe4577 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -5159,7 +5159,7 @@ int RGWRados::create_bucket(RGWUserInfo& owner, rgw_bucket& bucket, info.bucket_index_shard_hash_type = RGWBucketInfo::MOD; info.requester_pays = false; if (real_clock::is_zero(creation_time)) - creation_time = ceph::real_clock::now(cct); + info.creation_time = ceph::real_clock::now(cct); else info.creation_time = creation_time; ret = put_linked_bucket_info(info, exclusive, ceph::real_time(), pep_objv, &attrs, true);