]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: rados coroutines take bucket by const ref
authorCasey Bodley <cbodley@redhat.com>
Mon, 15 Feb 2016 21:42:17 +0000 (16:42 -0500)
committerYehuda Sadeh <yehuda@redhat.com>
Thu, 18 Feb 2016 22:04:20 +0000 (14:04 -0800)
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/rgw_cr_rados.cc
src/rgw/rgw_cr_rados.h

index 761acfee5aa37b93a82dcd5809ac6af37a35c8eb..2f8cca870a03837649cd0e8c11a647e0ee1f736e 100644 (file)
@@ -253,7 +253,7 @@ int RGWRadosSetOmapKeysCR::request_complete()
 }
 
 RGWRadosGetOmapKeysCR::RGWRadosGetOmapKeysCR(RGWRados *_store,
-                      rgw_bucket& _pool, const string& _oid,
+                      const rgw_bucket& _pool, const string& _oid,
                       const string& _marker,
                       map<string, bufferlist> *_entries, int _max_entries) : RGWSimpleCoroutine(_store->ctx()),
                                                 store(_store),
@@ -286,7 +286,7 @@ int RGWRadosGetOmapKeysCR::send_request() {
 }
 
 RGWSimpleRadosLockCR::RGWSimpleRadosLockCR(RGWAsyncRadosProcessor *_async_rados, RGWRados *_store,
-                      rgw_bucket& _pool, const string& _oid, const string& _lock_name,
+                      const rgw_bucket& _pool, const string& _oid, const string& _lock_name,
                       const string& _cookie,
                       uint32_t _duration) : RGWSimpleCoroutine(_store->ctx()),
                                                 async_rados(_async_rados),
@@ -325,7 +325,7 @@ int RGWSimpleRadosLockCR::request_complete()
 }
 
 RGWSimpleRadosUnlockCR::RGWSimpleRadosUnlockCR(RGWAsyncRadosProcessor *_async_rados, RGWRados *_store,
-                      rgw_bucket& _pool, const string& _oid, const string& _lock_name,
+                      const rgw_bucket& _pool, const string& _oid, const string& _lock_name,
                       const string& _cookie) : RGWSimpleCoroutine(_store->ctx()),
                                                 async_rados(_async_rados),
                                                 store(_store),
index 52722578aff31f027c01d4280039b110e8489702..97fe612b22b61b608370b50cf9747988a77e71d4 100644 (file)
@@ -175,7 +175,7 @@ class RGWSimpleRadosReadCR : public RGWSimpleCoroutine {
 public:
   RGWSimpleRadosReadCR(RGWAsyncRadosProcessor *_async_rados, RGWRados *_store,
                      RGWObjectCtx& _obj_ctx,
-                     rgw_bucket& _pool, const string& _oid,
+                     const rgw_bucket& _pool, const string& _oid,
                      T *_result) : RGWSimpleCoroutine(_store->ctx()),
                                                 async_rados(_async_rados), store(_store),
                                                 obj_ctx(_obj_ctx),
@@ -282,7 +282,7 @@ class RGWSimpleRadosWriteCR : public RGWSimpleCoroutine {
 
 public:
   RGWSimpleRadosWriteCR(RGWAsyncRadosProcessor *_async_rados, RGWRados *_store,
-                     rgw_bucket& _pool, const string& _oid,
+                     const rgw_bucket& _pool, const string& _oid,
                      const T& _data) : RGWSimpleCoroutine(_store->ctx()),
                                                 async_rados(_async_rados),
                                                store(_store),
@@ -386,7 +386,7 @@ class RGWRadosGetOmapKeysCR : public RGWSimpleCoroutine {
 
 public:
   RGWRadosGetOmapKeysCR(RGWRados *_store,
-                     rgw_bucket& _pool, const string& _oid,
+                     const rgw_bucket& _pool, const string& _oid,
                      const string& _marker,
                      map<string, bufferlist> *_entries, int _max_entries);
   ~RGWRadosGetOmapKeysCR();
@@ -412,7 +412,7 @@ class RGWSimpleRadosLockCR : public RGWSimpleCoroutine {
 
 public:
   RGWSimpleRadosLockCR(RGWAsyncRadosProcessor *_async_rados, RGWRados *_store,
-                     rgw_bucket& _pool, const string& _oid, const string& _lock_name,
+                     const rgw_bucket& _pool, const string& _oid, const string& _lock_name,
                      const string& _cookie,
                      uint32_t _duration);
   ~RGWSimpleRadosLockCR();
@@ -434,7 +434,7 @@ class RGWSimpleRadosUnlockCR : public RGWSimpleCoroutine {
 
 public:
   RGWSimpleRadosUnlockCR(RGWAsyncRadosProcessor *_async_rados, RGWRados *_store,
-                     rgw_bucket& _pool, const string& _oid, const string& _lock_name,
+                     const rgw_bucket& _pool, const string& _oid, const string& _lock_name,
                      const string& _cookie);
   ~RGWSimpleRadosUnlockCR();
 
@@ -819,7 +819,7 @@ class RGWContinuousLeaseCR : public RGWCoroutine {
   RGWAsyncRadosProcessor *async_rados;
   RGWRados *store;
 
-  rgw_bucket pool;
+  const rgw_bucket& pool;
   string oid;
 
   string lock_name;
@@ -836,7 +836,8 @@ class RGWContinuousLeaseCR : public RGWCoroutine {
   bool aborted;
 
 public:
-  RGWContinuousLeaseCR(RGWAsyncRadosProcessor *_async_rados, RGWRados *_store, rgw_bucket& _pool, const string& _oid,
+  RGWContinuousLeaseCR(RGWAsyncRadosProcessor *_async_rados, RGWRados *_store,
+                       const rgw_bucket& _pool, const string& _oid,
                        const string& _lock_name, int _interval, RGWCoroutine *_caller) : RGWCoroutine(_store->ctx()), async_rados(_async_rados), store(_store),
                                         pool(_pool), oid(_oid), lock_name(_lock_name), interval(_interval),
                                         lock("RGWContimuousLeaseCR"), locked(false), caller(_caller), aborted(false) {