]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: account m_processing when failing request after refresh 12160/head
authorVenky Shankar <vshankar@redhat.com>
Wed, 23 Nov 2016 09:05:03 +0000 (14:35 +0530)
committerVenky Shankar <vshankar@redhat.com>
Wed, 23 Nov 2016 10:55:17 +0000 (16:25 +0530)
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 <vshankar@redhat.com>
src/librbd/AioImageRequestWQ.cc

index 52fdd8d6d85771c9305c5de74607541e2d272378..8565932924e7f8ad4f686b2e0b48d67a24e27b3f 100644 (file)
@@ -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;