From 2070fcf7d4260e3a13219ce708a46b2c550ccc14 Mon Sep 17 00:00:00 2001 From: Jason Dillaman Date: Wed, 15 Nov 2017 10:35:16 -0500 Subject: [PATCH] librbd: invalidating the cache shouldn't hold write lock This can cause deadlock when readahead is in-progress since neither can make forward progress. Fixes: http://tracker.ceph.com/issues/22131 Signed-off-by: Jason Dillaman (cherry picked from commit 6a335481d20c6a765c84d561a01fb52172eccba4) --- src/librbd/internal.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/src/librbd/internal.cc b/src/librbd/internal.cc index acbe336629c..d2695f57416 100644 --- a/src/librbd/internal.cc +++ b/src/librbd/internal.cc @@ -2244,7 +2244,6 @@ int validate_pool(IoCtx &io_ctx, CephContext *cct) { } RWLock::RLocker owner_locker(ictx->owner_lock); - RWLock::WLocker md_locker(ictx->md_lock); r = ictx->invalidate_cache(false); ictx->perfcounter->inc(l_librbd_invalidate_cache); return r; -- 2.47.3