mirror of
https://github.com/ceph/ceph
synced 2025-02-23 19:17:37 +00:00
os/bluestore: Do not copy a string just to find its length
I really dislike whoever decided to disallow taking the address of member functions in the standard library. Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
This commit is contained in:
parent
7344796570
commit
f26851b6d4
@ -4727,8 +4727,11 @@ int BlueStore::_open_db(bool create, bool to_repair_db)
|
||||
env->CreateDir(fn);
|
||||
if (cct->_conf->rocksdb_separate_wal_dir)
|
||||
env->CreateDir(fn + ".wal");
|
||||
if (cct->_conf->get_val<std::string>("rocksdb_db_paths").length())
|
||||
env->CreateDir(fn + ".slow");
|
||||
|
||||
if (cct->_conf->with_val<std::string>(
|
||||
"rocksdb_db_paths", [](const std::string& s) {
|
||||
return s.length(); }))
|
||||
env->CreateDir(fn + ".slow");
|
||||
}
|
||||
} else if (create) {
|
||||
int r = ::mkdir(fn.c_str(), 0755);
|
||||
|
Loading…
Reference in New Issue
Block a user