From: Yehuda Sadeh Date: Mon, 19 Dec 2016 22:15:36 +0000 (-0800) Subject: rgw: fix async cr operation X-Git-Tag: v12.0.1~111^2~8 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=21200e8dbc2a723642f47d7585e6327c23d6dd3f;p=ceph.git rgw: fix async cr operation Fix crash due to code cleanup. Changes scope of obj ref. Signed-off-by: Yehuda Sadeh --- diff --git a/src/rgw/rgw_cr_rados.cc b/src/rgw/rgw_cr_rados.cc index da9eda6e036f..489ef5891725 100644 --- a/src/rgw/rgw_cr_rados.cc +++ b/src/rgw/rgw_cr_rados.cc @@ -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; diff --git a/src/rgw/rgw_cr_rados.h b/src/rgw/rgw_cr_rados.h index 52e33717ee4a..b1e1a1fcdf9f 100644 --- a/src/rgw/rgw_cr_rados.h +++ b/src/rgw/rgw_cr_rados.h @@ -386,6 +386,8 @@ class RGWRadosSetOmapKeysCR : public RGWSimpleCoroutine { RGWRados *store; map 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 keys;