]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mon: let CrushWrapper::get_validated_type_id() return an optional<>
authorKefu Chai <kchai@redhat.com>
Wed, 21 Jul 2021 04:36:12 +0000 (12:36 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 21 Jul 2021 04:57:21 +0000 (12:57 +0800)
commitb35f4ed81865eacd34e81dd4d1368ea092f51523
tree36c6394ee3b6070e825bf19d644928145b7be37e
parenteabe3c5cee6112908e6765a2af0ad73c6e260274
mon: let CrushWrapper::get_validated_type_id() return an optional<>

easier to reason about. and it helps to silence the false alarm of

../src/mon/OSDMonitor.cc: In member function 'void OSDMonitor::try_enable_stretch_mode(std::stringstream&, bool*, int*, bool, const string&, uint32_t, const std::set<pg_pool_t*>&, const string&)':
../src/mon/OSDMonitor.cc:14379:44: warning: 'dividing_id' may be used uninitialized in this function [-Wmaybe-uninitialized]
14379 |       pool->peering_crush_bucket_barrier = dividing_id;
      |                                            ^~~~~~~~~~~

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/crush/CrushWrapper.h
src/mon/Monitor.cc
src/mon/OSDMonitor.cc