]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/rgw/rgw_cr_rados.cc
update sources to v12.1.1
[ceph.git] / ceph / src / rgw / rgw_cr_rados.cc
index 21f4a00f47a68f9fa0af5620cf22b1772fdfb9cd..107d605158cdd26cf3f89bae7c2b3d3076c44726 100644 (file)
@@ -220,13 +220,6 @@ RGWRadosSetOmapKeysCR::RGWRadosSetOmapKeysCR(RGWRados *_store,
   s << "]";
 }
 
-RGWRadosSetOmapKeysCR::~RGWRadosSetOmapKeysCR()
-{
-  if (cn) {
-    cn->put();
-  }
-}
-
 int RGWRadosSetOmapKeysCR::send_request()
 {
   int r = store->get_raw_obj_ref(obj, &ref);
@@ -241,7 +234,6 @@ int RGWRadosSetOmapKeysCR::send_request()
   op.omap_set(entries);
 
   cn = stack->create_completion_notifier();
-  cn->get();
   return ref.ioctx.aio_operate(ref.oid, cn->completion(), &op);
 }
 
@@ -266,10 +258,6 @@ RGWRadosGetOmapKeysCR::RGWRadosGetOmapKeysCR(RGWRados *_store,
   set_description() << "set omap keys dest=" << obj << " marker=" << marker;
 }
 
-RGWRadosGetOmapKeysCR::~RGWRadosGetOmapKeysCR()
-{
-}
-
 int RGWRadosGetOmapKeysCR::send_request() {
   int r = store->get_raw_obj_ref(obj, &ref);
   if (r < 0) {
@@ -296,10 +284,6 @@ RGWRadosRemoveOmapKeysCR::RGWRadosRemoveOmapKeysCR(RGWRados *_store,
   set_description() << "remove omap keys dest=" << obj << " keys=" << keys;
 }
 
-RGWRadosRemoveOmapKeysCR::~RGWRadosRemoveOmapKeysCR()
-{
-}
-
 int RGWRadosRemoveOmapKeysCR::send_request() {
   int r = store->get_raw_obj_ref(obj, &ref);
   if (r < 0) {
@@ -316,6 +300,15 @@ int RGWRadosRemoveOmapKeysCR::send_request() {
   return ref.ioctx.aio_operate(ref.oid, cn->completion(), &op);
 }
 
+int RGWRadosRemoveOmapKeysCR::request_complete()
+{
+  int r = cn->completion()->get_return_value();
+
+  set_status() << "request complete; ret=" << r;
+
+  return r;
+}
+
 RGWRadosRemoveCR::RGWRadosRemoveCR(RGWRados *store, const rgw_raw_obj& obj)
   : RGWSimpleCoroutine(store->ctx()), store(store), obj(obj)
 {
@@ -692,19 +685,11 @@ RGWRadosTimelogAddCR::RGWRadosTimelogAddCR(RGWRados *_store, const string& _oid,
   entries.push_back(entry);
 }
 
-RGWRadosTimelogAddCR::~RGWRadosTimelogAddCR()
-{
-  if (cn) {
-    cn->put();
-  }
-}
-
 int RGWRadosTimelogAddCR::send_request()
 {
   set_status() << "sending request";
 
   cn = stack->create_completion_notifier();
-  cn->get();
   return store->time_log_add(oid, entries, cn->completion(), true);
 }
 
@@ -732,19 +717,11 @@ RGWRadosTimelogTrimCR::RGWRadosTimelogTrimCR(RGWRados *store,
       << " from_marker=" << from_marker << " to_marker=" << to_marker;
 }
 
-RGWRadosTimelogTrimCR::~RGWRadosTimelogTrimCR()
-{
-  if (cn) {
-    cn->put();
-  }
-}
-
 int RGWRadosTimelogTrimCR::send_request()
 {
   set_status() << "sending request";
 
   cn = stack->create_completion_notifier();
-  cn->get();
   return store->time_log_trim(oid, start_time, end_time, from_marker,
                               to_marker, cn->completion());
 }