]> git.proxmox.com Git - ceph.git/blob - ceph/src/rocksdb/options/options_sanity_check.cc
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / rocksdb / options / options_sanity_check.cc
1 // Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
2 // This source code is licensed under both the GPLv2 (found in the
3 // COPYING file in the root directory) and Apache 2.0 License
4 // (found in the LICENSE.Apache file in the root directory).
5
6 #ifndef ROCKSDB_LITE
7
8 #include "options/options_sanity_check.h"
9
10 namespace ROCKSDB_NAMESPACE {
11
12 namespace {
13 OptionsSanityCheckLevel SanityCheckLevelHelper(
14 const std::unordered_map<std::string, OptionsSanityCheckLevel>& smap,
15 const std::string& name) {
16 auto iter = smap.find(name);
17 return iter != smap.end() ? iter->second : kSanityLevelExactMatch;
18 }
19 }
20
21 OptionsSanityCheckLevel DBOptionSanityCheckLevel(
22 const std::string& option_name) {
23 return SanityCheckLevelHelper(sanity_level_db_options, option_name);
24 }
25
26 OptionsSanityCheckLevel CFOptionSanityCheckLevel(
27 const std::string& option_name) {
28 return SanityCheckLevelHelper(sanity_level_cf_options, option_name);
29 }
30
31 OptionsSanityCheckLevel BBTOptionSanityCheckLevel(
32 const std::string& option_name) {
33 return SanityCheckLevelHelper(sanity_level_bbt_options, option_name);
34 }
35
36 } // namespace ROCKSDB_NAMESPACE
37
38 #endif // !ROCKSDB_LITE