_deferred_replay needs the kv_sync_thread to complete IOs; start them
just for that, but then shut them down again. (We might revisit that
later if/when fsck does any sort of repair.)
Signed-off-by: Sage Weil <sage@redhat.com>
mempool_thread.init();
+ // we need finishrs and kv_sync_thread *just* for replay.
+ for (auto f : finishers) {
+ f->start();
+ }
+ kv_sync_thread.create("bstore_kv_sync");
r = _deferred_replay();
+ _kv_stop();
+ for (auto f : finishers) {
+ f->wait_for_empty();
+ f->stop();
+ }
if (r < 0)
goto out_scan;