From 8980fa22348dfff885b5412d1c3c03f4937846ab Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 2 Mar 2010 09:57:25 -0800 Subject: [PATCH] filestore: fix ondisk vs onreadable_sync deadlock Do ondisk completion async in journaled_ahead completion to avoid any onreadable_sync getting held up behind an ondisk completion. Reuse the op_finisher finisher thread for this. --- src/os/FileStore.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/os/FileStore.cc b/src/os/FileStore.cc index 8541addf79f7c..4ba67b3aa483b 100644 --- a/src/os/FileStore.cc +++ b/src/os/FileStore.cc @@ -823,10 +823,11 @@ void FileStore::_journaled_ahead(__u64 op, dout(10) << "_journaled_ahead " << op << " " << tls << dendl; // this should queue in order because the journal does it's completions in order. queue_op(op, tls, onreadable, onreadable_sync); - if (ondisk) { - ondisk->finish(0); - delete ondisk; - } + + // do ondisk completions async, to prevent any onreadable_sync completions + // getting blocked behind an ondisk completion. + if (ondisk) + op_finisher.queue(ondisk); } int FileStore::do_transactions(list &tls, __u64 op_seq) -- 2.39.5