From 1b36be9850e0c30a62316bcb724de21101041660 Mon Sep 17 00:00:00 2001 From: John Spray Date: Thu, 1 Dec 2016 19:10:35 +0000 Subject: [PATCH] osdc/Journaler: wrap recover() completion in finisher Otherwise, the callback will deadlock if it in turn calls into any Journaler functions. Don't care about performance because we do this once at startup. Signed-off-by: John Spray --- src/osdc/Journaler.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osdc/Journaler.cc b/src/osdc/Journaler.cc index 22e5327c11c1d..df92fd807d4c1 100644 --- a/src/osdc/Journaler.cc +++ b/src/osdc/Journaler.cc @@ -164,7 +164,7 @@ void Journaler::recover(Context *onread) assert(readonly); if (onread) - waitfor_recover.push_back(onread); + waitfor_recover.push_back(wrap_finisher(onread)); if (state != STATE_UNDEF) { ldout(cct, 1) << "recover - already recovering" << dendl; -- 2.39.5