We are using stopping flag everywhere to indicate that a shutdown
procedure of the mds-daemon is already in progress, but we never
set stopping to true correctly.
The suicide() method is the proper place to set the stopping flag
as it is the only exit for mds-daemon.
Signed-off-by: huanwen ren <ren.huanwen@zte.com.cn>
void MDSDaemon::suicide()
{
assert(mds_lock.is_locked());
+
+ // make sure we don't suicide twice
+ assert(stopping == false);
+ stopping = true;
dout(1) << "suicide. wanted state "
<< ceph_mds_state_name(beacon.get_want_state()) << dendl;