From 9457f8b53379621b23091722fadbaffc03e7594e Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Thu, 6 Aug 2015 15:37:46 -0700 Subject: [PATCH] rgw: rename async ops to coroutines which they basically are Signed-off-by: Yehuda Sadeh --- src/rgw/rgw_sync.cc | 144 ++++++++++++++++++++++---------------------- src/rgw/rgw_sync.h | 76 +++++++++++------------ 2 files changed, 110 insertions(+), 110 deletions(-) diff --git a/src/rgw/rgw_sync.cc b/src/rgw/rgw_sync.cc index fe55d8dc4c8ce..c0a27fb53f5b3 100644 --- a/src/rgw/rgw_sync.cc +++ b/src/rgw/rgw_sync.cc @@ -424,15 +424,15 @@ int RGWMetaSyncStatusManager::set_state(RGWMetaSyncGlobalStatus::SyncState state return 0; } -void RGWAsyncOp::call(RGWAsyncOp *op) +void RGWCoroutine::call(RGWCoroutine *op) { int r = env->stack->call(op, 0); assert(r == 0); } -void RGWAsyncOp::call_concurrent(RGWAsyncOp *op) +void RGWCoroutine::spawn(RGWCoroutine *op) { - RGWAsyncOpsStack *stack = env->manager->allocate_stack(); + RGWCoroutinesStack *stack = env->manager->allocate_stack(); int r = stack->call(op, 0); assert(r == 0); @@ -442,7 +442,7 @@ void RGWAsyncOp::call_concurrent(RGWAsyncOp *op) env->stack->set_blocked_by(stack); } -class RGWSimpleAsyncOp : public RGWAsyncOp { +class RGWSimpleCoroutine : public RGWCoroutine { enum State { Init = 0, SendRequest = 1, @@ -467,7 +467,7 @@ protected: CephContext *cct; public: - RGWSimpleAsyncOp(CephContext *_cct) : state(Init), cct(_cct) {} + RGWSimpleCoroutine(CephContext *_cct) : state(Init), cct(_cct) {} virtual int init() { return 0; } virtual int send_request() = 0; @@ -478,7 +478,7 @@ public: bool is_error() { return (state == Error); } }; -int RGWSimpleAsyncOp::operate() +int RGWSimpleCoroutine::operate() { switch (state) { case Init: @@ -504,7 +504,7 @@ int RGWSimpleAsyncOp::operate() return 0; } -int RGWSimpleAsyncOp::state_init() +int RGWSimpleCoroutine::state_init() { int ret = init(); if (ret < 0) { @@ -513,7 +513,7 @@ int RGWSimpleAsyncOp::state_init() return set_state(SendRequest); } -int RGWSimpleAsyncOp::state_send_request() +int RGWSimpleCoroutine::state_send_request() { int ret = send_request(); if (ret < 0) { @@ -522,7 +522,7 @@ int RGWSimpleAsyncOp::state_send_request() return yield(set_state(RequestComplete)); } -int RGWSimpleAsyncOp::state_request_complete() +int RGWSimpleCoroutine::state_request_complete() { int ret = request_complete(); if (ret < 0) { @@ -531,7 +531,7 @@ int RGWSimpleAsyncOp::state_request_complete() return set_state(AllComplete); } -int RGWSimpleAsyncOp::state_all_complete() +int RGWSimpleCoroutine::state_all_complete() { int ret = finish(); if (ret < 0) { @@ -541,7 +541,7 @@ int RGWSimpleAsyncOp::state_all_complete() } template -class RGWSimpleRadosAsyncOp : public RGWSimpleAsyncOp { +class RGWSimpleRadosCoroutine : public RGWSimpleCoroutine { RGWAsyncRadosProcessor *async_rados; RGWRados *store; RGWObjectCtx& obj_ctx; @@ -555,17 +555,17 @@ class RGWSimpleRadosAsyncOp : public RGWSimpleAsyncOp { RGWAsyncGetSystemObj *req; public: - RGWSimpleRadosAsyncOp(RGWAsyncRadosProcessor *_async_rados, RGWRados *_store, + RGWSimpleRadosCoroutine(RGWAsyncRadosProcessor *_async_rados, RGWRados *_store, RGWObjectCtx& _obj_ctx, rgw_bucket& _pool, const string& _oid, - T *_result) : RGWSimpleAsyncOp(_store->ctx()), + T *_result) : RGWSimpleCoroutine(_store->ctx()), async_rados(_async_rados), store(_store), obj_ctx(_obj_ctx), pool(_pool), oid(_oid), result(_result), req(NULL) { } - ~RGWSimpleRadosAsyncOp() { + ~RGWSimpleRadosCoroutine() { delete req; } @@ -578,7 +578,7 @@ public: }; template -int RGWSimpleRadosAsyncOp::send_request() +int RGWSimpleRadosCoroutine::send_request() { rgw_obj obj = rgw_obj(pool, oid); req = new RGWAsyncGetSystemObj(env->stack->create_completion_notifier(), @@ -590,7 +590,7 @@ int RGWSimpleRadosAsyncOp::send_request() } template -int RGWSimpleRadosAsyncOp::request_complete() +int RGWSimpleRadosCoroutine::request_complete() { int ret = req->get_ret_status(); if (ret != -ENOENT) { @@ -610,7 +610,7 @@ int RGWSimpleRadosAsyncOp::request_complete() return handle_data(*result); } -class RGWReadSyncStatusOp : public RGWSimpleRadosAsyncOp { +class RGWReadSyncStatusCoroutine : public RGWSimpleRadosCoroutine { RGWAsyncRadosProcessor *async_rados; RGWRados *store; RGWObjectCtx& obj_ctx; @@ -619,9 +619,9 @@ class RGWReadSyncStatusOp : public RGWSimpleRadosAsyncOpget_zone_params().log_pool, "mdlog.state.global", _gs), @@ -631,16 +631,16 @@ public: int handle_data(RGWMetaSyncGlobalStatus& data); }; -int RGWReadSyncStatusOp::handle_data(RGWMetaSyncGlobalStatus& data) +int RGWReadSyncStatusCoroutine::handle_data(RGWMetaSyncGlobalStatus& data) { - call_concurrent(new RGWSimpleRadosAsyncOp(async_rados, store, obj_ctx, store->get_zone_params().log_pool, + spawn(new RGWSimpleRadosCoroutine(async_rados, store, obj_ctx, store->get_zone_params().log_pool, "mdlog.state.0", &sync_marker)); - call_concurrent(new RGWSimpleRadosAsyncOp(async_rados, store, obj_ctx, store->get_zone_params().log_pool, + spawn(new RGWSimpleRadosCoroutine(async_rados, store, obj_ctx, store->get_zone_params().log_pool, "mdlog.state.1", &sync_marker)); return 0; } -class RGWMetaSyncOp : public RGWAsyncOp { +class RGWMetaSyncCoroutine : public RGWCoroutine { RGWRados *store; RGWMetadataLog *mdlog; RGWHTTPManager *http_manager; @@ -665,13 +665,13 @@ class RGWMetaSyncOp : public RGWAsyncOp { return ret; } public: - RGWMetaSyncOp(RGWRados *_store, RGWHTTPManager *_mgr, int _id) : RGWAsyncOp(), store(_store), + RGWMetaSyncCoroutine(RGWRados *_store, RGWHTTPManager *_mgr, int _id) : RGWCoroutine(), store(_store), mdlog(store->meta_mgr->get_log()), http_manager(_mgr), shard_id(_id), max_entries(CLONE_MAX_ENTRIES), http_op(NULL), - state(RGWMetaSyncOp::Init) {} + state(RGWMetaSyncCoroutine::Init) {} int operate(); @@ -683,7 +683,7 @@ public: bool is_error() { return (state == Error); } }; -int RGWMetaSyncOp::operate() +int RGWMetaSyncCoroutine::operate() { switch (state) { case Init: @@ -706,22 +706,22 @@ int RGWMetaSyncOp::operate() return 0; } -int RGWMetaSyncOp::state_init() +int RGWMetaSyncCoroutine::state_init() { return 0; } -int RGWMetaSyncOp::state_read_sync_status() +int RGWMetaSyncCoroutine::state_read_sync_status() { return 0; } -int RGWMetaSyncOp::state_read_sync_status_complete() +int RGWMetaSyncCoroutine::state_read_sync_status_complete() { return 0; } -class RGWCloneMetaLogOp : public RGWAsyncOp { +class RGWCloneMetaLogCoroutine : public RGWCoroutine { RGWRados *store; RGWMetadataLog *mdlog; RGWHTTPManager *http_manager; @@ -757,14 +757,14 @@ class RGWCloneMetaLogOp : public RGWAsyncOp { return ret; } public: - RGWCloneMetaLogOp(RGWRados *_store, RGWHTTPManager *_mgr, - int _id, const string& _marker) : RGWAsyncOp(), store(_store), + RGWCloneMetaLogCoroutine(RGWRados *_store, RGWHTTPManager *_mgr, + int _id, const string& _marker) : RGWCoroutine(), store(_store), mdlog(store->meta_mgr->get_log()), http_manager(_mgr), shard_id(_id), marker(_marker), truncated(false), max_entries(CLONE_MAX_ENTRIES), http_op(NULL), md_op_notifier(NULL), req_ret(0), - state(RGWCloneMetaLogOp::Init) {} + state(RGWCloneMetaLogCoroutine::Init) {} int operate(); @@ -780,7 +780,7 @@ public: bool is_error() { return (state == Error); } }; -RGWAsyncOpsStack::RGWAsyncOpsStack(CephContext *_cct, RGWAsyncOpsManager *_ops_mgr, RGWAsyncOp *start) : cct(_cct), ops_mgr(_ops_mgr), +RGWCoroutinesStack::RGWCoroutinesStack(CephContext *_cct, RGWCoroutinesManager *_ops_mgr, RGWCoroutine *start) : cct(_cct), ops_mgr(_ops_mgr), done_flag(false), error_flag(false), blocked_flag(false) { if (start) { ops.push_back(start); @@ -788,9 +788,9 @@ RGWAsyncOpsStack::RGWAsyncOpsStack(CephContext *_cct, RGWAsyncOpsManager *_ops_m pos = ops.begin(); } -int RGWAsyncOpsStack::operate(RGWAsyncOpsEnv *env) +int RGWCoroutinesStack::operate(RGWCoroutinesEnv *env) { - RGWAsyncOp *op = *pos; + RGWCoroutine *op = *pos; int r = op->do_operate(env); if (r < 0) { ldout(cct, 0) << "ERROR: op->operate() returned r=" << r << dendl; @@ -812,7 +812,7 @@ int RGWAsyncOpsStack::operate(RGWAsyncOpsEnv *env) return 0; } -string RGWAsyncOpsStack::error_str() +string RGWCoroutinesStack::error_str() { if (pos != ops.end()) { return (*pos)->error_str(); @@ -820,7 +820,7 @@ string RGWAsyncOpsStack::error_str() return string(); } -int RGWAsyncOpsStack::call(RGWAsyncOp *next_op, int ret) { +int RGWCoroutinesStack::call(RGWCoroutine *next_op, int ret) { ops.push_back(next_op); if (pos != ops.end()) { ++pos; @@ -830,7 +830,7 @@ int RGWAsyncOpsStack::call(RGWAsyncOp *next_op, int ret) { return ret; } -int RGWAsyncOpsStack::unwind(int retcode) +int RGWCoroutinesStack::unwind(int retcode) { if (pos == ops.begin()) { pos = ops.end(); @@ -839,12 +839,12 @@ int RGWAsyncOpsStack::unwind(int retcode) --pos; ops.pop_back(); - RGWAsyncOp *op = *pos; + RGWCoroutine *op = *pos; op->set_retcode(retcode); return 0; } -void RGWAsyncOpsStack::set_blocked(bool flag) +void RGWCoroutinesStack::set_blocked(bool flag) { blocked_flag = flag; if (pos != ops.end()) { @@ -852,23 +852,23 @@ void RGWAsyncOpsStack::set_blocked(bool flag) } } -AioCompletionNotifier *RGWAsyncOpsStack::create_completion_notifier() +AioCompletionNotifier *RGWCoroutinesStack::create_completion_notifier() { return ops_mgr->create_completion_notifier(this); } -RGWCompletionManager *RGWAsyncOpsStack::get_completion_mgr() +RGWCompletionManager *RGWCoroutinesStack::get_completion_mgr() { return ops_mgr->get_completion_mgr(); } -bool RGWAsyncOpsStack::unblock_stack(RGWAsyncOpsStack **s) +bool RGWCoroutinesStack::unblock_stack(RGWCoroutinesStack **s) { if (blocking_stacks.empty()) { return false; } - set::iterator iter = blocking_stacks.begin(); + set::iterator iter = blocking_stacks.begin(); *s = *iter; blocking_stacks.erase(iter); (*s)->blocked_by_stack.erase(this); @@ -876,13 +876,13 @@ bool RGWAsyncOpsStack::unblock_stack(RGWAsyncOpsStack **s) return true; } -void RGWAsyncOpsManager::report_error(RGWAsyncOpsStack *op) +void RGWCoroutinesManager::report_error(RGWCoroutinesStack *op) { #warning need to have error logging infrastructure that logs on backend lderr(cct) << "ERROR: failed operation: " << op->error_str() << dendl; } -void RGWAsyncOpsManager::handle_unblocked_stack(list& stacks, RGWAsyncOpsStack *stack, int *waiting_count) +void RGWCoroutinesManager::handle_unblocked_stack(list& stacks, RGWCoroutinesStack *stack, int *waiting_count) { --(*waiting_count); stack->set_blocked(false); @@ -893,16 +893,16 @@ void RGWAsyncOpsManager::handle_unblocked_stack(list& stacks } } -int RGWAsyncOpsManager::run(list& stacks) +int RGWCoroutinesManager::run(list& stacks) { int waiting_count = 0; - RGWAsyncOpsEnv env; + RGWCoroutinesEnv env; env.manager = this; env.stacks = &stacks; - for (list::iterator iter = stacks.begin(); iter != stacks.end();) { - RGWAsyncOpsStack *stack = *iter; + for (list::iterator iter = stacks.begin(); iter != stacks.end();) { + RGWCoroutinesStack *stack = *iter; env.stack = stack; int ret = stack->operate(&env); if (ret < 0) { @@ -918,7 +918,7 @@ int RGWAsyncOpsManager::run(list& stacks) } else if (stack->is_blocked()) { waiting_count++; } else if (stack->is_done()) { - RGWAsyncOpsStack *s; + RGWCoroutinesStack *s; while (stack->unblock_stack(&s)) { if (!s->is_blocked_by_stack() && !s->is_done()) { if (s->is_blocked()) { @@ -933,7 +933,7 @@ int RGWAsyncOpsManager::run(list& stacks) stacks.push_back(stack); } - RGWAsyncOpsStack *blocked_stack; + RGWCoroutinesStack *blocked_stack; while (completion_mgr.try_get_next((void **)&blocked_stack)) { handle_unblocked_stack(stacks, blocked_stack, &waiting_count); } @@ -961,10 +961,10 @@ int RGWAsyncOpsManager::run(list& stacks) return 0; } -int RGWAsyncOpsManager::run(RGWAsyncOp *op) +int RGWCoroutinesManager::run(RGWCoroutine *op) { - list stacks; - RGWAsyncOpsStack *stack = allocate_stack(); + list stacks; + RGWCoroutinesStack *stack = allocate_stack(); int r = stack->call(op); if (r < 0) { ldout(cct, 0) << "ERROR: stack->call() returned r=" << r << dendl; @@ -981,17 +981,17 @@ int RGWAsyncOpsManager::run(RGWAsyncOp *op) return r; } -AioCompletionNotifier *RGWAsyncOpsManager::create_completion_notifier(RGWAsyncOpsStack *stack) +AioCompletionNotifier *RGWCoroutinesManager::create_completion_notifier(RGWCoroutinesStack *stack) { return new AioCompletionNotifier(&completion_mgr, (void *)stack); } int RGWRemoteMetaLog::clone_shards() { - list stacks; + list stacks; for (int i = 0; i < (int)log_info.num_shards; i++) { - RGWAsyncOpsStack *stack = new RGWAsyncOpsStack(store->ctx(), this); - int r = stack->call(new RGWCloneMetaLogOp(store, &http_manager, i, clone_markers[i])); + RGWCoroutinesStack *stack = new RGWCoroutinesStack(store->ctx(), this); + int r = stack->call(new RGWCloneMetaLogCoroutine(store, &http_manager, i, clone_markers[i])); if (r < 0) { ldout(store->ctx(), 0) << "ERROR: stack->call() returned r=" << r << dendl; return r; @@ -1005,10 +1005,10 @@ int RGWRemoteMetaLog::clone_shards() int RGWRemoteMetaLog::fetch() { - list stacks; + list stacks; for (int i = 0; i < (int)log_info.num_shards; i++) { - RGWAsyncOpsStack *stack = new RGWAsyncOpsStack(store->ctx(), this); - int r = stack->call(new RGWCloneMetaLogOp(store, &http_manager, i, clone_markers[i])); + RGWCoroutinesStack *stack = new RGWCoroutinesStack(store->ctx(), this); + int r = stack->call(new RGWCloneMetaLogCoroutine(store, &http_manager, i, clone_markers[i])); if (r < 0) { ldout(store->ctx(), 0) << "ERROR: stack->call() returned r=" << r << dendl; return r; @@ -1023,7 +1023,7 @@ int RGWRemoteMetaLog::fetch() int RGWRemoteMetaLog::get_sync_status(RGWMetaSyncGlobalStatus *sync_status) { RGWObjectCtx obj_ctx(store, NULL); - return run(new RGWReadSyncStatusOp(async_rados, store, obj_ctx, sync_status)); + return run(new RGWReadSyncStatusCoroutine(async_rados, store, obj_ctx, sync_status)); } int RGWRemoteMetaLog::get_shard_sync_marker(int shard_id, rgw_sync_marker *shard_status) @@ -1039,7 +1039,7 @@ int RGWRemoteMetaLog::get_shard_sync_marker(int shard_id, rgw_sync_marker *shard return 0; } -int RGWCloneMetaLogOp::operate() +int RGWCloneMetaLogCoroutine::operate() { switch (state) { case Init: @@ -1074,14 +1074,14 @@ int RGWCloneMetaLogOp::operate() return 0; } -int RGWCloneMetaLogOp::state_init() +int RGWCloneMetaLogCoroutine::state_init() { data = rgw_mdlog_shard_data(); return set_state(ReadShardStatus); } -int RGWCloneMetaLogOp::state_read_shard_status() +int RGWCloneMetaLogCoroutine::state_read_shard_status() { int ret = mdlog->get_info_async(shard_id, &shard_info, env->stack->get_completion_mgr(), (void *)env->stack, &req_ret); if (ret < 0) { @@ -1092,7 +1092,7 @@ int RGWCloneMetaLogOp::state_read_shard_status() return yield(set_state(ReadShardStatusComplete)); } -int RGWCloneMetaLogOp::state_read_shard_status_complete() +int RGWCloneMetaLogCoroutine::state_read_shard_status_complete() { ldout(store->ctx(), 20) << "shard_id=" << shard_id << " marker=" << shard_info.marker << " last_update=" << shard_info.last_update << dendl; @@ -1101,7 +1101,7 @@ int RGWCloneMetaLogOp::state_read_shard_status_complete() return set_state(SendRESTRequest); } -int RGWCloneMetaLogOp::state_send_rest_request() +int RGWCloneMetaLogCoroutine::state_send_rest_request() { RGWRESTConn *conn = store->rest_master_conn; @@ -1134,7 +1134,7 @@ int RGWCloneMetaLogOp::state_send_rest_request() return yield(set_state(ReceiveRESTResponse)); } -int RGWCloneMetaLogOp::state_receive_rest_response() +int RGWCloneMetaLogCoroutine::state_receive_rest_response() { int ret = http_op->wait(&data); if (ret < 0) { @@ -1157,7 +1157,7 @@ int RGWCloneMetaLogOp::state_receive_rest_response() } -int RGWCloneMetaLogOp::state_store_mdlog_entries() +int RGWCloneMetaLogCoroutine::state_store_mdlog_entries() { list dest_entries; @@ -1190,7 +1190,7 @@ int RGWCloneMetaLogOp::state_store_mdlog_entries() return yield(set_state(StoreMDLogEntriesComplete)); } -int RGWCloneMetaLogOp::state_store_mdlog_entries_complete() +int RGWCloneMetaLogCoroutine::state_store_mdlog_entries_complete() { if (truncated) { return state_init(); diff --git a/src/rgw/rgw_sync.h b/src/rgw/rgw_sync.h index 5aa23c54ba298..39570bd93a2bc 100644 --- a/src/rgw/rgw_sync.h +++ b/src/rgw/rgw_sync.h @@ -23,22 +23,22 @@ struct rgw_mdlog_info { #define RGW_ASYNC_OPS_MGR_WINDOW 16 -class RGWAsyncOpsStack; -class RGWAsyncOpsManager; +class RGWCoroutinesStack; +class RGWCoroutinesManager; class AioCompletionNotifier; -struct RGWAsyncOpsEnv { - RGWAsyncOpsManager *manager; - list *stacks; - RGWAsyncOpsStack *stack; +struct RGWCoroutinesEnv { + RGWCoroutinesManager *manager; + list *stacks; + RGWCoroutinesStack *stack; - RGWAsyncOpsEnv() : manager(NULL), stacks(NULL), stack(NULL) {} + RGWCoroutinesEnv() : manager(NULL), stacks(NULL), stack(NULL) {} }; -class RGWAsyncOp : public RefCountedObject { - friend class RGWAsyncOpsStack; +class RGWCoroutine : public RefCountedObject { + friend class RGWCoroutinesStack; protected: - RGWAsyncOpsEnv *env; + RGWCoroutinesEnv *env; bool blocked; int retcode; @@ -50,17 +50,17 @@ protected: return ret; } - int do_operate(RGWAsyncOpsEnv *_env) { + int do_operate(RGWCoroutinesEnv *_env) { env = _env; return operate(); } - void call(RGWAsyncOp *op); - void call_concurrent(RGWAsyncOp *op); + void call(RGWCoroutine *op); + void spawn(RGWCoroutine *op); public: - RGWAsyncOp() : env(NULL), blocked(false), retcode(0) {} - virtual ~RGWAsyncOp() {} + RGWCoroutine() : env(NULL), blocked(false), retcode(0) {} + virtual ~RGWCoroutine() {} virtual int operate() = 0; @@ -79,16 +79,16 @@ public: } }; -class RGWAsyncOpsStack { +class RGWCoroutinesStack { CephContext *cct; - RGWAsyncOpsManager *ops_mgr; + RGWCoroutinesManager *ops_mgr; - list ops; - list::iterator pos; + list ops; + list::iterator pos; - set blocked_by_stack; - set blocking_stacks; + set blocked_by_stack; + set blocking_stacks; bool done_flag; @@ -96,9 +96,9 @@ class RGWAsyncOpsStack { bool blocked_flag; public: - RGWAsyncOpsStack(CephContext *_cct, RGWAsyncOpsManager *_ops_mgr, RGWAsyncOp *start = NULL); + RGWCoroutinesStack(CephContext *_cct, RGWCoroutinesManager *_ops_mgr, RGWCoroutine *start = NULL); - int operate(RGWAsyncOpsEnv *env); + int operate(RGWCoroutinesEnv *env); bool is_done() { return done_flag; @@ -117,24 +117,24 @@ public: string error_str(); - int call(RGWAsyncOp *next_op, int ret = 0); + int call(RGWCoroutine *next_op, int ret = 0); int unwind(int retcode); AioCompletionNotifier *create_completion_notifier(); RGWCompletionManager *get_completion_mgr(); - void set_blocked_by(RGWAsyncOpsStack *s) { + void set_blocked_by(RGWCoroutinesStack *s) { blocked_by_stack.insert(s); s->blocking_stacks.insert(this); } - bool unblock_stack(RGWAsyncOpsStack **s); + bool unblock_stack(RGWCoroutinesStack **s); }; -class RGWAsyncOpsManager { +class RGWCoroutinesManager { CephContext *cct; - void handle_unblocked_stack(list& stacks, RGWAsyncOpsStack *stack, int *waiting_count); + void handle_unblocked_stack(list& stacks, RGWCoroutinesStack *stack, int *waiting_count); protected: RGWCompletionManager completion_mgr; @@ -142,19 +142,19 @@ protected: void put_completion_notifier(AioCompletionNotifier *cn); public: - RGWAsyncOpsManager(CephContext *_cct) : cct(_cct), ops_window(RGW_ASYNC_OPS_MGR_WINDOW) {} - virtual ~RGWAsyncOpsManager() {} + RGWCoroutinesManager(CephContext *_cct) : cct(_cct), ops_window(RGW_ASYNC_OPS_MGR_WINDOW) {} + virtual ~RGWCoroutinesManager() {} - int run(list& ops); - int run(RGWAsyncOp *op); + int run(list& ops); + int run(RGWCoroutine *op); - virtual void report_error(RGWAsyncOpsStack *op); + virtual void report_error(RGWCoroutinesStack *op); - AioCompletionNotifier *create_completion_notifier(RGWAsyncOpsStack *stack); + AioCompletionNotifier *create_completion_notifier(RGWCoroutinesStack *stack); RGWCompletionManager *get_completion_mgr() { return &completion_mgr; } - RGWAsyncOpsStack *allocate_stack() { - return new RGWAsyncOpsStack(cct, this); + RGWCoroutinesStack *allocate_stack() { + return new RGWCoroutinesStack(cct, this); } }; @@ -262,7 +262,7 @@ public: class RGWAsyncRadosProcessor; -class RGWRemoteMetaLog : public RGWAsyncOpsManager { +class RGWRemoteMetaLog : public RGWCoroutinesManager { RGWRados *store; RGWRESTConn *conn; RGWAsyncRadosProcessor *async_rados; @@ -291,7 +291,7 @@ class RGWRemoteMetaLog : public RGWAsyncOpsManager { RGWMetaSyncStatusManager status_manager; public: - RGWRemoteMetaLog(RGWRados *_store) : RGWAsyncOpsManager(_store->ctx()), store(_store), + RGWRemoteMetaLog(RGWRados *_store) : RGWCoroutinesManager(_store->ctx()), store(_store), conn(NULL), ts_to_shard_lock("ts_to_shard_lock"), http_manager(store->ctx(), &completion_mgr), status_manager(store) {} -- 2.39.5