]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
common,rbd,rgw,osd: extract config values into ConfigValues
authorKefu Chai <kchai@redhat.com>
Fri, 6 Jul 2018 09:20:32 +0000 (17:20 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 10 Jul 2018 14:51:22 +0000 (22:51 +0800)
commit4718b7cb2fac65b2ac7014f42ba1a10181350f0b
tree80ed52aeae220a1b3b65778d2c68dca582dacd6a
parent737b9e3ef8d158f05b5d04af86992ce0ea5d04de
common,rbd,rgw,osd: extract config values into ConfigValues

this change introduce three classes: ConfigValues, ConfigProxy and
ConfigReader. in seastar port of OSD, each CPU shard will hold its own
reference of configuration, and upon changes of settings, each
shard will be updated with the new setting in async. so this forces us
to be able to keep two set of configuration at the same time. so we
need to extract the changeable part of md_config_t out. so we can
replace the old one with new one on demand, and let different shards
share the same unchanged part, amon the other things, the Options map
and the lookup tables. that's why we need ConfigValues. we will add
a policy template for this class, so we can specialize for Seastar
implementation to allow different ConfigProxy instances to point
md_config_impl<> to different ConfigValues.

because the observer interface is still using md_config_t, to minimise
the impact of this change, handle_conf_change() and
handle_subsys_change() are not changed. but as it accepts a `const
md_config_t`, which cannot be used to create/reference the ConfigProxy
holding it, we need to introduce ConfigReader for reading the updated
setting from md_config_t in a simpler way, without exposing the
internal "values" member variable.

Signed-off-by: Kefu Chai <kchai@redhat.com>
173 files changed:
src/CMakeLists.txt
src/auth/KeyRing.cc
src/ceph_mon.cc
src/ceph_osd.cc
src/ceph_syn.cc
src/client/Client.cc
src/common/HeartbeatMap.cc
src/common/LogClient.cc
src/common/PluginRegistry.cc
src/common/TracepointProvider.cc
src/common/TracepointProvider.h
src/common/WorkQueue.cc
src/common/ceph_context.cc
src/common/ceph_context.h
src/common/common_init.cc
src/common/config.cc
src/common/config.h
src/common/config_cacher.h
src/common/config_fwd.h
src/common/config_proxy.h [new file with mode: 0644]
src/common/config_values.cc [new file with mode: 0644]
src/common/config_values.h [new file with mode: 0644]
src/common/pick_address.cc
src/common/shared_cache.hpp
src/crush/CrushWrapper.cc
src/global/global_context.cc
src/global/global_context.h
src/global/global_init.cc
src/global/pidfile.cc
src/global/pidfile.h
src/global/signal_handler.cc
src/krbd.cc
src/kv/LevelDBStore.cc
src/kv/RocksDBStore.cc
src/libcephfs.cc
src/librados/RadosClient.h
src/librados/librados.cc
src/librbd/ImageCtx.cc
src/librbd/ImageState.cc
src/librbd/ImageWatcher.cc
src/librbd/Journal.cc
src/librbd/Utils.cc
src/librbd/deep_copy/ImageCopyRequest.cc
src/librbd/image/CloneRequest.cc
src/librbd/image/CreateRequest.cc
src/librbd/internal.cc
src/librbd/librbd.cc
src/log/Log.cc
src/log/Log.h
src/log/SubsystemMap.h
src/mds/Beacon.cc
src/mds/CDir.cc
src/mds/CDir.h
src/mds/CInode.cc
src/mds/CInode.h
src/mds/DamageTable.cc
src/mds/FSMap.cc
src/mds/Locker.cc
src/mds/MDBalancer.cc
src/mds/MDCache.cc
src/mds/MDCache.h
src/mds/MDLog.cc
src/mds/MDSDaemon.cc
src/mds/MDSRank.cc
src/mds/MDSTableClient.cc
src/mds/MDSTableServer.cc
src/mds/Migrator.cc
src/mds/Migrator.h
src/mds/PurgeQueue.cc
src/mds/RecoveryQueue.cc
src/mds/ScrubStack.cc
src/mds/Server.cc
src/mds/SessionMap.cc
src/mds/journal.cc
src/mgr/ActivePyModules.cc
src/mgr/BaseMgrModule.cc
src/mgr/BaseMgrStandbyModule.cc
src/mgr/DaemonServer.cc
src/mgr/MgrClient.cc
src/mgr/MgrStandby.cc
src/mgr/PyModule.cc
src/mgr/PyModuleRegistry.cc
src/mgr/PyModuleRunner.cc
src/mon/AuthMonitor.cc
src/mon/ConfigKeyService.cc
src/mon/ConfigMonitor.cc
src/mon/Elector.cc
src/mon/FSCommands.cc
src/mon/HealthMonitor.cc
src/mon/LogMonitor.cc
src/mon/LogMonitor.h
src/mon/MDSMonitor.cc
src/mon/MgrMonitor.cc
src/mon/MonClient.cc
src/mon/MonMap.cc
src/mon/Monitor.cc
src/mon/Monitor.h
src/mon/MonitorDBStore.h
src/mon/MonmapMonitor.cc
src/mon/OSDMonitor.cc
src/mon/PGMap.cc
src/mon/Paxos.cc
src/mon/Paxos.h
src/mon/PaxosService.cc
src/mon/QuorumService.h
src/msg/Messenger.cc
src/msg/Messenger.h
src/msg/Policy.h
src/msg/async/AsyncConnection.cc
src/msg/async/AsyncMessenger.cc
src/msg/simple/Accepter.cc
src/msg/simple/Pipe.cc
src/os/FuseStore.cc
src/os/bluestore/BlueFS.h
src/os/bluestore/BlueStore.cc
src/os/bluestore/NVMEDevice.cc
src/os/filestore/FDCache.h
src/os/filestore/FileJournal.h
src/os/filestore/FileStore.cc
src/os/filestore/WBThrottle.cc
src/osd/ECBackend.cc
src/osd/OSD.cc
src/osd/OSD.h
src/osd/OSDMap.cc
src/osd/PG.cc
src/osd/PGBackend.cc
src/osd/PrimaryLogPG.cc
src/osd/ReplicatedBackend.cc
src/osd/Session.cc
src/osd/SnapMapper.cc
src/osdc/Journaler.cc
src/osdc/Objecter.cc
src/perfglue/heap_profiler.cc
src/rgw/rgw_cache.h
src/rgw/rgw_client_io_filters.h
src/rgw/rgw_cr_rados.cc
src/rgw/rgw_lc.cc
src/rgw/rgw_op.cc
src/rgw/rgw_op.h
src/rgw/rgw_rados.cc
src/rgw/rgw_rados.h
src/rgw/rgw_rest.cc
src/rgw/rgw_rest_s3.cc
src/rgw/rgw_sync_log_trim.cc
src/rgw/rgw_torrent.cc
src/test/confutils.cc
src/test/daemon_config.cc
src/test/librados_test_stub/LibradosTestStub.cc
src/test/librbd/journal/test_Entries.cc
src/test/librbd/test_internal.cc
src/test/objectstore/store_test_fixture.cc
src/test/rbd_mirror/image_map/test_Policy.cc
src/test/rbd_mirror/test_ImageReplayer.cc
src/tools/ceph_authtool.cc
src/tools/ceph_conf.cc
src/tools/monmaptool.cc
src/tools/rbd/Utils.cc
src/tools/rbd_mirror/ImageDeleter.cc
src/tools/rbd_mirror/ImageMap.cc
src/tools/rbd_mirror/ImageReplayer.cc
src/tools/rbd_mirror/ImageSync.cc
src/tools/rbd_mirror/ImageSyncThrottler.cc
src/tools/rbd_mirror/InstanceReplayer.cc
src/tools/rbd_mirror/InstanceWatcher.cc
src/tools/rbd_mirror/Instances.cc
src/tools/rbd_mirror/LeaderWatcher.cc
src/tools/rbd_mirror/Mirror.cc
src/tools/rbd_mirror/PoolReplayer.cc
src/tools/rbd_mirror/Threads.cc
src/tools/rbd_mirror/image_map/Policy.cc
src/tools/rbd_mirror/image_replayer/CreateImageRequest.cc
src/tools/rbd_mirror/image_replayer/PrepareRemoteImageRequest.cc
src/tools/rbd_nbd/rbd-nbd.cc