]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Added option to deploy omap to a separate device(path)
authorChendi Xue <chendi.xue@intel.com>
Thu, 29 Oct 2015 14:09:40 +0000 (22:09 +0800)
committerBoris Ranto <branto@redhat.com>
Fri, 6 May 2016 11:44:18 +0000 (13:44 +0200)
In the HDD as OSD, SSD as journal test, we saw a great
throughput improvement if moving omap to a SSD device at
randwrite case.

This patch aim to add a config option 'filestore_omap_backend_path'
for users to configurate omap path before deploy.

Signed-off-by: Chendi Xue <chendi.xue@intel.com>
src/common/config_opts.h
src/os/filestore/FileStore.cc

index e0f028f95fb8b1d1643158b341ff13754d14afab..c2534fd8dceaae5891e0dfa76583dc6d5239e43b 100644 (file)
@@ -981,6 +981,7 @@ OPTION(kstore_cache_tails, OPT_BOOL, true)
 OPTION(kstore_default_stripe_size, OPT_INT, 65536)
 
 OPTION(filestore_omap_backend, OPT_STR, "leveldb")
+OPTION(filestore_omap_backend_path, OPT_STR, "")
 
 OPTION(filestore_debug_disable_sharded_check, OPT_BOOL, false)
 
index deebd20245db48988402ff3a36a2b6da9b0a77b4..ba5d877b7f4a005d73fadf334209f3c12747f455 100644 (file)
@@ -591,8 +591,12 @@ FileStore::FileStore(const std::string &base, const std::string &jdev, osflagbit
   current_op_seq_fn = sss.str();
 
   ostringstream omss;
-  omss << basedir << "/current/omap";
-  omap_dir = omss.str();
+  if (g_conf->filestore_omap_backend_path != "") {
+      omap_dir = g_conf->filestore_omap_backend_path;
+  } else {
+      omss << basedir << "/current/omap";
+      omap_dir = omss.str();
+  }
 
   // initialize logger
   PerfCountersBuilder plb(g_ceph_context, internal_name, l_os_first, l_os_last);