mirror of
https://github.com/ceph/ceph
synced 2025-02-20 09:27:35 +00:00
Currently in CrushWrapper, the member "struct crush_map *crush" is a public member, so people can break the encapsulation and manipulate directly to the crush structure. This is not a good practice for encapsulation and will lead to inconsistent if code mix use the CrushWrapper API and crush C API.A simple example could be: 1.some code use crush_add_rule(C-API) to add a rule, which will not set the have_rmap flag to false in CrushWrapper 2.another code using CrushWrapper trying to look up the newly added rule by name will get a -ENOENT. This patch move CrushWrapper::crush to private, together with three reverse map(type_rmap, name_rmap, rule_name_rmap) and also change codes accessing the CrushWrapper::crush to make it compile. Signed-off-by: Xiaoxi Chen <xiaoxi.chen@intel.com> |
||
---|---|---|
.. | ||
cephfs | ||
rados | ||
ceph_authtool.cc | ||
ceph_conf.cc | ||
ceph_kvstore_tool.cc | ||
ceph_monstore_tool.cc | ||
ceph_objectstore_tool.cc | ||
ceph_osdomap_tool.cc | ||
ceph-client-debug.cc | ||
ceph.cc | ||
common.cc | ||
common.h | ||
crushtool.cc | ||
dupstore.cc | ||
Makefile.am | ||
mon_store_converter.cc | ||
monmaptool.cc | ||
osdmaptool.cc | ||
psim.cc | ||
radosacl.cc | ||
rest_bench.cc | ||
scratchtool.c | ||
scratchtoolpp.cc |