]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/newstore: add 'newstore backend options' to pass options to e.g. rocksdb
authorSage Weil <sage@redhat.com>
Tue, 18 Aug 2015 21:22:32 +0000 (17:22 -0400)
committerSage Weil <sage@redhat.com>
Tue, 1 Sep 2015 17:39:43 +0000 (13:39 -0400)
Signed-off-by: Sage Weil <sage@redhat.com>
src/common/config_opts.h
src/os/newstore/NewStore.cc

index efb0d66207349959e4b7eff9730c9c0557dce168..f8bbdfbc0a5651a92c9c9057fc9d89884cf4f662 100644 (file)
@@ -793,6 +793,7 @@ OPTION(memstore_page_size, OPT_U64, 64 << 10)
 OPTION(newstore_max_dir_size, OPT_U32, 1000000)
 OPTION(newstore_onode_map_size, OPT_U32, 1024)   // onodes per collection
 OPTION(newstore_backend, OPT_STR, "rocksdb")
+OPTION(newstore_backend_options, OPT_STR, "")
 OPTION(newstore_fail_eio, OPT_BOOL, true)
 OPTION(newstore_sync_io, OPT_BOOL, false)  // perform initial io synchronously
 OPTION(newstore_sync_transaction, OPT_BOOL, false)  // perform kv txn synchronously
index 9f5adc244e10667c986b317720c9e35e764c7246..002d4e73bd413a0632f32526877972e80da131d3 100644 (file)
@@ -828,7 +828,7 @@ int NewStore::_open_db()
     db = NULL;
     return -EIO;
   }
-  db->init();
+  db->init(g_conf->newstore_backend_options);
   stringstream err;
   if (db->create_and_open(err)) {
     derr << __func__ << " erroring opening db: " << err.str() << dendl;
@@ -836,6 +836,9 @@ int NewStore::_open_db()
     db = NULL;
     return -EIO;
   }
+  dout(1) << __func__ << " opened " << g_conf->newstore_backend
+         << " path " << path
+         << " options " << g_conf->newstore_backend_options << dendl;
   return 0;
 }