mirror of
https://github.com/ceph/ceph
synced 2025-03-11 02:39:05 +00:00
mon:some cleanup in MonmapMonitor.cc
remove the processing of ”mon add“ && “mon remove” in the preprocess_command; delete unused "get_monmap(MonMap &m)" Signed-off-by: huanwen ren <ren.huanwen@zte.com.cn>
This commit is contained in:
parent
67e3d95135
commit
698e4a1c71
@ -240,10 +240,6 @@ bool MonmapMonitor::preprocess_command(MonOpRequestRef op)
|
||||
if (p != mon->monmap)
|
||||
delete p;
|
||||
}
|
||||
else if (prefix == "mon add")
|
||||
return false;
|
||||
else if (prefix == "mon remove")
|
||||
return false;
|
||||
|
||||
reply:
|
||||
if (r != -1) {
|
||||
@ -582,16 +578,3 @@ int MonmapMonitor::get_monmap(bufferlist &bl)
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int MonmapMonitor::get_monmap(MonMap &m)
|
||||
{
|
||||
dout(10) << __func__ << dendl;
|
||||
bufferlist monmap_bl;
|
||||
|
||||
int err = get_monmap(monmap_bl);
|
||||
if (err < 0) {
|
||||
return err;
|
||||
}
|
||||
m.decode(monmap_bl);
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user