]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr: clean up DaemonStateIndex locking
authorJohn Spray <john.spray@redhat.com>
Thu, 24 Aug 2017 16:53:24 +0000 (12:53 -0400)
committerJohn Spray <john.spray@redhat.com>
Wed, 1 Nov 2017 23:03:22 +0000 (23:03 +0000)
commitd70fae092db920e2db77c7c8b044cfb4d9687992
treef5f35e2effc21c239dbd364fb0c0343070257a4e
parentb86cc9a2e49a4d1b53e83f47876a42b42819efcb
mgr: clean up DaemonStateIndex locking

Various things here were dangerously operating
outside locks.

Additionally switch to a RWLock because this lock
will be relatively read-hot when it's taken every time
a MMgrReport is handled, to look up the DaemonState
for the sender.

Fixes: http://tracker.ceph.com/issues/21158
Signed-off-by: John Spray <john.spray@redhat.com>
(cherry picked from commit 806f10847cefe5c7a78fc319b1b130d372197dd3)
src/mgr/DaemonServer.cc
src/mgr/DaemonState.cc
src/mgr/DaemonState.h
src/mgr/PyModules.cc