AioCompletion() : lock("AioCompletion::lock", true), done(false), rval(0), complete_cb(NULL), complete_arg(NULL),
rbd_comp(NULL), pending_count(0), ref(1), released(false) {
- dout(10) << "AioCompletion::AioCompletion() this=" << (void *)this << dendl;
+ dout(20) << "AioCompletion::AioCompletion() this=" << (void *)this << dendl;
}
~AioCompletion() {
- dout(10) << "AioCompletion::~AioCompletion()" << dendl;
+ dout(20) << "AioCompletion::~AioCompletion() this=" << (void *)this << dendl;
}
int wait_for_complete() {
+ dout(20) << "AioCompletion::wait_for_complete() this=" << (void *)this << dendl;
lock.Lock();
while (!done)
cond.Wait(lock);
}
void add_block_completion(AioBlockCompletion *aio_completion) {
- dout(10) << "add_block_completion this=" << (void *)this << dendl;
+ dout(20) << "AioCompletion::add_block_completion() this=" << (void *)this << dendl;
lock.Lock();
pending_count++;
lock.Unlock();
void complete_block(AioBlockCompletion *block_completion, ssize_t r);
ssize_t get_return_value() {
+ dout(20) << "AioCompletion::get_return_value() this=" << (void *)this << dendl;
lock.Lock();
ssize_t r = rval;
lock.Unlock();
void get() {
lock.Lock();
+ dout(20) << " AioCompletion::get() this=" << (void *)this << " " << ref << " -> " << ref + 1 << dendl;
assert(ref > 0);
ref++;
lock.Unlock();
}
void release() {
lock.Lock();
+ dout(20) << "AioCompletion::release() this=" << (void *)this << dendl;
assert(!released);
released = true;
put_unlock();
}
void put_unlock() {
assert(ref > 0);
+ dout(20) << "AioCompletion::put_unlock() this=" << (void *)this << " " << ref << " -> " << ref - 1 << dendl;
int n = --ref;
lock.Unlock();
if (!n)
void AioCompletion::complete_block(AioBlockCompletion *block_completion, ssize_t r)
{
- dout(10) << "AioCompletion::complete_block this=" << (void *)this << " complete_cb=" << (void *)complete_cb << dendl;
+ dout(20) << "AioCompletion::complete_block() this=" << (void *)this << " complete_cb=" << (void *)complete_cb << dendl;
lock.Lock();
if (rval >= 0) {
if (r < 0 && r != -EEXIST)