mirror of
https://github.com/ceph/ceph
synced 2025-03-10 18:29:40 +00:00
rgw: more leak fixes
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
This commit is contained in:
parent
9ffa3e20bd
commit
46f1ee548d
@ -90,6 +90,11 @@ void RGWCompletionManager::_wakeup(void *opaque)
|
||||
}
|
||||
}
|
||||
|
||||
RGWCoroutine::~RGWCoroutine() {
|
||||
for (auto stack : spawned.entries) {
|
||||
stack->put();
|
||||
}
|
||||
}
|
||||
|
||||
void RGWCoroutine::set_io_blocked(bool flag) {
|
||||
stack->set_io_blocked(flag);
|
||||
@ -142,6 +147,10 @@ RGWCoroutinesStack::~RGWCoroutinesStack()
|
||||
for (auto op : ops) {
|
||||
op->put();
|
||||
}
|
||||
|
||||
for (auto stack : spawned.entries) {
|
||||
stack->put();
|
||||
}
|
||||
}
|
||||
|
||||
int RGWCoroutinesStack::operate(RGWCoroutinesEnv *_env)
|
||||
|
@ -207,7 +207,7 @@ protected:
|
||||
|
||||
public:
|
||||
RGWCoroutine(CephContext *_cct) : status(_cct), _yield_ret(false), cct(_cct), stack(NULL), retcode(0), state(RGWCoroutine_Run) {}
|
||||
virtual ~RGWCoroutine() {}
|
||||
virtual ~RGWCoroutine();
|
||||
|
||||
virtual int operate() = 0;
|
||||
|
||||
|
@ -65,7 +65,7 @@ class RGWReadDataSyncStatusCoroutine : public RGWSimpleRadosReadCR<rgw_data_sync
|
||||
|
||||
rgw_data_sync_status *sync_status;
|
||||
|
||||
list<RGWCoroutinesStack *> crs;
|
||||
list<RGWSimpleRadosReadCR<rgw_data_sync_marker> *> crs;
|
||||
|
||||
public:
|
||||
RGWReadDataSyncStatusCoroutine(RGWAsyncRadosProcessor *_async_rados, RGWRados *_store,
|
||||
@ -94,8 +94,9 @@ int RGWReadDataSyncStatusCoroutine::handle_data(rgw_data_sync_info& data)
|
||||
|
||||
map<uint32_t, rgw_data_sync_marker>& markers = sync_status->sync_markers;
|
||||
for (int i = 0; i < (int)data.num_shards; i++) {
|
||||
RGWCoroutinesStack *cr = spawn(new RGWSimpleRadosReadCR<rgw_data_sync_marker>(async_rados, store, obj_ctx, store->get_zone_params().log_pool,
|
||||
RGWDataSyncStatusManager::shard_obj_name(source_zone, i), &markers[i]), true);
|
||||
RGWSimpleRadosReadCR<rgw_data_sync_marker> *cr = new RGWSimpleRadosReadCR<rgw_data_sync_marker>(async_rados, store, obj_ctx, store->get_zone_params().log_pool,
|
||||
RGWDataSyncStatusManager::shard_obj_name(source_zone, i), &markers[i]);
|
||||
spawn(cr, true);
|
||||
crs.push_back(cr);
|
||||
}
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user