]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: remove kludgey rocksdb preconditioning
authorSage Weil <sage@redhat.com>
Thu, 1 Dec 2016 18:53:46 +0000 (13:53 -0500)
committerSage Weil <sage@redhat.com>
Mon, 5 Dec 2016 18:46:34 +0000 (13:46 -0500)
This doesn't work, it's slow, and it's hacky.

Signed-off-by: Sage Weil <sage@redhat.com>
src/common/config_opts.h
src/os/bluestore/BlueStore.cc

index 61c196611be6ad21bfb0ca98f5dc91952e1c4d00..b9b7b57c1beac6ff2f249d748e9efae75aa6d76b 100644 (file)
@@ -1006,8 +1006,6 @@ OPTION(bluestore_block_wal_path, OPT_STR, "")
 OPTION(bluestore_block_wal_size, OPT_U64, 96 * 1024*1024) // rocksdb wal
 OPTION(bluestore_block_wal_create, OPT_BOOL, false)
 OPTION(bluestore_block_preallocate_file, OPT_BOOL, false) //whether preallocate space if block/db_path/wal_path is file rather that block device.
-OPTION(bluestore_precondition_bluefs, OPT_U64, 512*1024*1024)  // write this much data at mkfs
-OPTION(bluestore_precondition_bluefs_block, OPT_U64, 1048576)
 OPTION(bluestore_csum_type, OPT_STR, "crc32c") // none|xxhash32|xxhash64|crc32c|crc32c_16|crc32c_8
 OPTION(bluestore_csum_min_block, OPT_U32, 4096)
 OPTION(bluestore_csum_max_block, OPT_U32, 64*1024)
index 83e15e7126eb2439069f2663aa18d8b59af4550c..a15afdfee73b2a3e85575f3c56d487f1a4924911 100644 (file)
@@ -3895,35 +3895,6 @@ int BlueStore::mkfs()
     goto out_close_alloc;
   dout(10) << __func__ << " success" << dendl;
 
-  if (bluefs &&
-      g_conf->bluestore_precondition_bluefs > 0) {
-    dout(10) << __func__ << " preconditioning with "
-            << pretty_si_t(g_conf->bluestore_precondition_bluefs)
-            << " in blocks of "
-            << pretty_si_t(g_conf->bluestore_precondition_bluefs_block)
-            << dendl;
-    unsigned n = g_conf->bluestore_precondition_bluefs /
-      g_conf->bluestore_precondition_bluefs_block;
-    bufferlist bl;
-    int len = g_conf->bluestore_precondition_bluefs_block;
-    char buf[len];
-    get_random_bytes(buf, len);
-    bl.append(buf, len);
-    string key1("a");
-    string key2("b");
-    for (unsigned i=0; i < n; ++i) {
-      KeyValueDB::Transaction t = db->get_transaction();
-      t->set(PREFIX_SUPER, (i & 1) ? key1 : key2, bl);
-      t->rmkey(PREFIX_SUPER, (i & 1) ? key2 : key1);
-      db->submit_transaction_sync(t);
-    }
-    KeyValueDB::Transaction t = db->get_transaction();
-    t->rmkey(PREFIX_SUPER, key1);
-    t->rmkey(PREFIX_SUPER, key2);
-    db->submit_transaction_sync(t);
-    dout(10) << __func__ << " done preconditioning" << dendl;
-  }
-
  out_close_alloc:
   _close_alloc();
  out_close_fm: