From: Venky Shankar Date: Wed, 23 Nov 2016 09:05:03 +0000 (+0530) Subject: librbd: account m_processing when failing request after refresh X-Git-Tag: v11.1.0~183^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F12160%2Fhead;p=ceph.git librbd: account m_processing when failing request after refresh AioImageRequestWQ::_void_process() dequeues an item from the work queue by invoking ThreadPool::_void_process() which also performs accounting by incrementing ->m_processing which never gets decremented if an image refresh fails. This is exactly the flow when running test_lock_fence.sh which blacklists a client and expects failed I/O operation from the client. Without this fix, running test_lock_fence.sh in a loop fails with an assert in PointerWQ dtor within 100 odd runs. Fixes: http://tracker.ceph.com/issues/17973 Signed-off-by: Venky Shankar --- diff --git a/src/librbd/AioImageRequestWQ.cc b/src/librbd/AioImageRequestWQ.cc index 52fdd8d6d8577..8565932924e7f 100644 --- a/src/librbd/AioImageRequestWQ.cc +++ b/src/librbd/AioImageRequestWQ.cc @@ -469,6 +469,7 @@ void AioImageRequestWQ::handle_refreshed(int r, AioImageRequest<> *req) { ldout(cct, 15) << "resuming IO after image refresh: r=" << r << ", " << "req=" << req << dendl; if (r < 0) { + process_finish(); req->fail(r); finish_queued_op(req); delete req;