]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
crimson/common: correct type of callback func 33233/head
authorKefu Chai <kchai@redhat.com>
Wed, 12 Feb 2020 08:12:38 +0000 (16:12 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 12 Feb 2020 08:33:22 +0000 (16:33 +0800)
commit42acd76579d057b353c8c25194e55a295c782308
treec315b39c324def574f6468e2fd4521b8eb3486e7
parentb556e42e20b13f76a6878b5bd2ade19b886d16e9
crimson/common: correct type of callback func

`md_config_obs_t` is defined as
```
using md_config_obs_t = ceph::md_config_obs_impl<ConfigProxy>;
```
in `common/config_obs.h`. it takes advantage of a fact that
somebody exposes the correct version of `ConfigProxy` to the global
namespace. this is intended to fulfill the needs of other components
which expects `md_config_obs_t`. otherwise we need to specify
`ceph::md_config_obs_impl<ceph::ConfigProxy>` or
`ceph::md_config_obs_impl<crimson::common::ConfigProxy>` depending on
if we are programming crimson or not.

but in this case, we are actually defining
`crimson::common::ConfigProxy`, so it'd be better to define
`md_config_obs_t` explicitly instead relying on "somebody" which exposes
`ConfigProxy`. and `ConfigObserver` is defined using the current
`ConfigProxy`, so it's more correct and more readable than using
`md_config_obs_t` defined in `common/config_obs.h`.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/crimson/common/config_proxy.h