]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph_test_objectstore: fix synthetic fsck
authorSage Weil <sage@redhat.com>
Tue, 1 Nov 2016 15:15:25 +0000 (11:15 -0400)
committerSage Weil <sage@redhat.com>
Tue, 1 Nov 2016 16:20:12 +0000 (12:20 -0400)
Signed-off-by: Sage Weil <sage@redhat.com>
src/test/objectstore/store_test.cc

index d176a565549b4d55765979c206bcc0ad734e2a96..a293f0476f6d4bbffaf82d3760d7f1c9b3a812db 100644 (file)
@@ -4072,11 +4072,7 @@ public:
     while (in_flight)
       cond.Wait(lock);
     store->umount();
-    // fixme: this is bluestore specific, but...
-    if (!g_conf->bluestore_fsck_on_mount &&
-       !g_conf->bluestore_fsck_on_umount) {
-      store->fsck();
-    }
+    store->fsck();
     store->mount();
   }
 
@@ -4235,6 +4231,10 @@ void doSyntheticTest(boost::scoped_ptr<ObjectStore>& store,
   gen_type rng(time(NULL));
   coll_t cid(spg_t(pg_t(0,555), shard_id_t::NO_SHARD));
 
+  g_ceph_context->_conf->set_val("bluestore_fsck_on_mount", "false");
+  g_ceph_context->_conf->set_val("bluestore_fsck_on_umount", "false");
+  g_ceph_context->_conf->apply_changes(NULL);
+
   SyntheticWorkloadState test_obj(store.get(), &gen, &rng, &osr, cid,
                                  max_obj, max_wr, align);
   test_obj.init();
@@ -4277,6 +4277,10 @@ void doSyntheticTest(boost::scoped_ptr<ObjectStore>& store,
   }
   test_obj.wait_for_done();
   test_obj.shutdown();
+
+  g_ceph_context->_conf->set_val("bluestore_fsck_on_mount", "true");
+  g_ceph_context->_conf->set_val("bluestore_fsck_on_umount", "true");
+  g_ceph_context->_conf->apply_changes(NULL);
 }
 
 TEST_P(StoreTest, Synthetic) {