From 60c9798b2fb32a40e78625e0ae23cfaa8e340d94 Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Thu, 7 Jan 2016 01:33:16 -0500 Subject: [PATCH] rgw: add exclusive param to RGWPeriod::set_latest_epoch Signed-off-by: Casey Bodley --- src/rgw/rgw_rados.cc | 5 +++-- src/rgw/rgw_rados.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index 11a1554998b29..7f221e41e9a5b 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -995,7 +995,7 @@ int RGWPeriod::use_latest_epoch() return 0; } -int RGWPeriod::set_latest_epoch(epoch_t epoch) +int RGWPeriod::set_latest_epoch(epoch_t epoch, bool exclusive) { string pool_name = get_pool_name(cct); string oid = get_period_oid_prefix() + get_latest_epoch_oid(); @@ -1008,7 +1008,8 @@ int RGWPeriod::set_latest_epoch(epoch_t epoch) ::encode(info, bl); - return rgw_put_system_obj(store, pool, oid, bl.c_str(), bl.length(), false, NULL, 0, NULL); + return rgw_put_system_obj(store, pool, oid, bl.c_str(), bl.length(), + exclusive, NULL, 0, NULL); } int RGWPeriod::delete_obj() diff --git a/src/rgw/rgw_rados.h b/src/rgw/rgw_rados.h index 2e737a02d26a4..e559b7fbda208 100644 --- a/src/rgw/rgw_rados.h +++ b/src/rgw/rgw_rados.h @@ -1433,7 +1433,7 @@ public: bool is_single_zonegroup(CephContext *cct, RGWRados *store); int get_latest_epoch(epoch_t& epoch); - int set_latest_epoch(epoch_t epoch); + int set_latest_epoch(epoch_t epoch, bool exclusive = false); int init(CephContext *_cct, RGWRados *_store, const string &period_realm_id, const string &period_realm_name = "", bool setup_obj = true); -- 2.39.5