The load of Keyvalue DB is heavy, allow user to put
DB to a seperate(fast) device.
Signed-off-by: Xiaoxi Chen <xiaoxi.chen@intel.com>
OPTION(newstore_overlay_max, OPT_INT, 32)
OPTION(newstore_open_by_handle, OPT_BOOL, true)
OPTION(newstore_o_direct, OPT_BOOL, true)
+OPTION(newstore_db_path, OPT_STR, "")
OPTION(filestore_omap_backend, OPT_STR, "leveldb")
cct(cct),
db(NULL),
fs(NULL),
+ db_path(cct->_conf->newstore_db_path),
path_fd(-1),
fsid_fd(-1),
frag_fd(-1),
if (r < 0)
goto out_close_fsid;
+ if (db_path != "") {
+ r = symlinkat(db_path.c_str(), path_fd, "db");
+ if (r < 0)
+ goto out_close_frag;
+ }
r = _open_db();
if (r < 0)
goto out_close_frag;
KeyValueDB *db;
FS *fs;
uuid_d fsid;
+ string db_path;
int path_fd; ///< open handle to $path
int fsid_fd; ///< open handle (locked) to $path/fsid
int frag_fd; ///< open handle to $path/fragments