]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
os/bluestore: fix fsck deferred_replay
authorSage Weil <sage@redhat.com>
Fri, 26 May 2017 20:24:57 +0000 (16:24 -0400)
committerSage Weil <sage@redhat.com>
Tue, 30 May 2017 01:56:17 +0000 (21:56 -0400)
_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>
src/os/bluestore/BlueStore.cc

index 087b5c37897ee0b78853096966365dc8e0da1b21..bbff5d607f29c62fb77ce98aabec970a7ecfbe3d 100644 (file)
@@ -5216,7 +5216,17 @@ int BlueStore::fsck(bool deep)
 
   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;