]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix async cr operation
authorYehuda Sadeh <yehuda@redhat.com>
Mon, 19 Dec 2016 22:15:36 +0000 (14:15 -0800)
committerYehuda Sadeh <yehuda@redhat.com>
Thu, 9 Mar 2017 17:18:55 +0000 (09:18 -0800)
Fix crash due to code cleanup. Changes scope of obj ref.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
src/rgw/rgw_cr_rados.cc
src/rgw/rgw_cr_rados.h

index da9eda6e036ffa22403b24647db9807deae87a0a..489ef589172593136a4b4f334f0e3db94544d13d 100644 (file)
@@ -228,7 +228,6 @@ RGWRadosSetOmapKeysCR::~RGWRadosSetOmapKeysCR()
 
 int RGWRadosSetOmapKeysCR::send_request()
 {
-  rgw_rados_ref ref;
   int r = store->get_raw_obj_ref(obj, &ref);
   if (r < 0) {
     lderr(store->ctx()) << "ERROR: failed to get ref for (" << obj << ") ret=" << r << dendl;
@@ -271,7 +270,6 @@ RGWRadosGetOmapKeysCR::~RGWRadosGetOmapKeysCR()
 }
 
 int RGWRadosGetOmapKeysCR::send_request() {
-  rgw_rados_ref ref;
   int r = store->get_raw_obj_ref(obj, &ref);
   if (r < 0) {
     lderr(store->ctx()) << "ERROR: failed to get ref for (" << obj << ") ret=" << r << dendl;
@@ -302,7 +300,6 @@ RGWRadosRemoveOmapKeysCR::~RGWRadosRemoveOmapKeysCR()
 }
 
 int RGWRadosRemoveOmapKeysCR::send_request() {
-  rgw_rados_ref ref;
   int r = store->get_raw_obj_ref(obj, &ref);
   if (r < 0) {
     lderr(store->ctx()) << "ERROR: failed to get ref for (" << obj << ") ret=" << r << dendl;
index 52e33717ee4a0a3daa4ddc33a6cd2a260160788a..b1e1a1fcdf9f2e42a40c770e7b91483fb3017b3a 100644 (file)
@@ -386,6 +386,8 @@ class RGWRadosSetOmapKeysCR : public RGWSimpleCoroutine {
   RGWRados *store;
   map<string, bufferlist> entries;
 
+  rgw_rados_ref ref;
+
   rgw_raw_obj obj;
 
   RGWAioCompletionNotifier *cn;
@@ -409,7 +411,7 @@ class RGWRadosGetOmapKeysCR : public RGWSimpleCoroutine {
   int max_entries;
 
   int rval;
-  librados::IoCtx ioctx;
+  rgw_rados_ref ref;
 
   rgw_raw_obj obj;
 
@@ -438,7 +440,7 @@ class RGWRadosRemoveOmapKeysCR : public RGWSimpleCoroutine {
   int max_entries;
 
   int rval;
-  librados::IoCtx ioctx;
+  rgw_rados_ref ref;
 
   set<string> keys;