}
TestIoCtxImpl::~TestIoCtxImpl() {
+ assert(m_pending_ops.read() == 0);
}
void TestObjectOperationImpl::get() {
int flags) {
// TODO flags for now
ops.get();
+ m_pending_ops.inc();
m_client->add_aio_operation(oid, true, boost::bind(
&TestIoCtxImpl::execute_aio_operations, this, oid, &ops,
reinterpret_cast<bufferlist*>(0),
bufferlist *pbl) {
// TODO ignoring flags for now
ops.get();
+ m_pending_ops.inc();
m_client->add_aio_operation(oid, true, boost::bind(
&TestIoCtxImpl::execute_aio_operations, this, oid, &ops, pbl, m_snapc), c);
return 0;
AioCompletionImpl *comp = new AioCompletionImpl();
ops.get();
+ m_pending_ops.inc();
m_client->add_aio_operation(oid, false, boost::bind(
&TestIoCtxImpl::execute_aio_operations, this, oid, &ops,
reinterpret_cast<bufferlist*>(0), m_snapc), comp);
AioCompletionImpl *comp = new AioCompletionImpl();
ops.get();
+ m_pending_ops.inc();
m_client->add_aio_operation(oid, false, boost::bind(
&TestIoCtxImpl::execute_aio_operations, this, oid, &ops, pbl,
m_snapc), comp);
break;
}
}
+ m_pending_ops.dec();
ops->put();
return ret;
}