From: Sage Weil Date: Tue, 18 Aug 2015 21:22:32 +0000 (-0400) Subject: os/newstore: add 'newstore backend options' to pass options to e.g. rocksdb X-Git-Tag: v9.1.0~242^2~12 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=faca5d0044f9b142cc362fd3978fe9afb982163f;p=ceph.git os/newstore: add 'newstore backend options' to pass options to e.g. rocksdb Signed-off-by: Sage Weil --- diff --git a/src/common/config_opts.h b/src/common/config_opts.h index efb0d6620734..f8bbdfbc0a56 100644 --- a/src/common/config_opts.h +++ b/src/common/config_opts.h @@ -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 diff --git a/src/os/newstore/NewStore.cc b/src/os/newstore/NewStore.cc index 9f5adc244e10..002d4e73bd41 100644 --- a/src/os/newstore/NewStore.cc +++ b/src/os/newstore/NewStore.cc @@ -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; }