#include "rgw_rados.h"
#include "rgw_coroutine.h"
-#include "rgw_boost_asio_yield.h"
#include "rgw_cr_rados.h"
#include "cls/lock/cls_lock_client.h"
+#include <boost/asio/yield.hpp>
+
#define dout_context g_ceph_context
#define dout_subsys ceph_subsys_rgw
{
}
-
RGWRadosSetOmapKeysCR::RGWRadosSetOmapKeysCR(RGWRados *_store,
const rgw_raw_obj& _obj,
map<string, bufferlist>& _entries) : RGWSimpleCoroutine(_store->ctx()),
s << "]";
}
-RGWRadosSetOmapKeysCR::~RGWRadosSetOmapKeysCR()
-{
- if (cn) {
- cn->put();
- }
-}
-
int RGWRadosSetOmapKeysCR::send_request()
{
int r = store->get_raw_obj_ref(obj, &ref);
op.omap_set(entries);
cn = stack->create_completion_notifier();
- cn->get();
return ref.ioctx.aio_operate(ref.oid, cn->completion(), &op);
}
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) {
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) {
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)
{
return req->get_ret_status();
}
-
int RGWOmapAppend::operate() {
reenter(this) {
for (;;) {
&key.instance, /* string *version_id, */
NULL, /* string *ptag, */
NULL, /* string *petag, */
- NULL, /* struct rgw_err *err, */
NULL, /* void (*progress_cb)(off_t, void *), */
- NULL); /* void *progress_data*); */
+ NULL, /* void *progress_data*); */
+ zones_trace);
if (r < 0) {
ldout(store->ctx(), 0) << "store->fetch_remote_obj() returned r=" << r << dendl;
del_op.params.obj_owner.set_name(owner_display_name);
del_op.params.mtime = timestamp;
del_op.params.high_precision_time = true;
+ del_op.params.zones_trace = zones_trace;
ret = del_op.delete_obj();
if (ret < 0) {
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);
}
<< " 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());
}