]>
Commit | Line | Data |
---|---|---|
9f95a23c TL |
1 | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- |
2 | // vim: ts=8 sw=2 smarttab | |
3 | ||
4 | #include "crimson/osd/object_context.h" | |
5 | ||
6 | #include "common/Formatter.h" | |
7 | #include "crimson/common/config_proxy.h" | |
8 | ||
9 | namespace crimson::osd { | |
10 | ||
9f95a23c TL |
11 | ObjectContextRegistry::ObjectContextRegistry(crimson::common::ConfigProxy &conf) |
12 | { | |
13 | obc_lru.set_target_size(conf.get_val<uint64_t>("crimson_osd_obc_lru_size")); | |
14 | conf.add_observer(this); | |
15 | } | |
16 | ||
17 | const char** ObjectContextRegistry::get_tracked_conf_keys() const | |
18 | { | |
19 | static const char* KEYS[] = { | |
20 | "crimson_osd_obc_lru_size", | |
21 | nullptr | |
22 | }; | |
23 | return KEYS; | |
24 | } | |
25 | ||
26 | void ObjectContextRegistry::handle_conf_change( | |
27 | const crimson::common::ConfigProxy& conf, | |
28 | const std::set <std::string> &changed) | |
29 | { | |
30 | obc_lru.set_target_size(conf.get_val<uint64_t>("crimson_osd_obc_lru_size")); | |
31 | } | |
32 | ||
33 | ||
34 | } |