Merge pull request #6547 from xiaoxichen/fix1

osd: check do_shutdown before do_restart

Reviewed-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
Sage Weil 2015-11-14 21:39:46 -05:00
commit 8dd801d86d

View File

@ -6544,16 +6544,17 @@ void OSD::handle_osd_map(MOSDMap *m)
dout(10) << " msg say newest map is " << m->newest_map << ", requesting more" << dendl;
osdmap_subscribe(osdmap->get_epoch()+1, true);
}
else if (do_shutdown) {
osd_lock.Unlock();
shutdown();
osd_lock.Lock();
}
else if (is_booting()) {
start_boot(); // retry
}
else if (do_restart)
start_boot();
osd_lock.Unlock();
if (do_shutdown)
shutdown();
osd_lock.Lock();
m->put();
}