]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: add exclusive param to RGWPeriod::set_latest_epoch
authorCasey Bodley <cbodley@redhat.com>
Thu, 7 Jan 2016 06:33:16 +0000 (01:33 -0500)
committerYehuda Sadeh <yehuda@redhat.com>
Fri, 12 Feb 2016 00:13:52 +0000 (16:13 -0800)
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/rgw_rados.cc
src/rgw/rgw_rados.h

index 11a1554998b29e5077d05b2b9fdba1eb12a942c5..7f221e41e9a5b86d1c4973816fddb4a09dc9f90d 100644 (file)
@@ -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()
index 2e737a02d26a42939194ba5a4a410c789d3791a8..e559b7fbda2081ac620ba667a2c1209d2c9c1087 100644 (file)
@@ -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);