mirror of
https://github.com/ceph/ceph
synced 2025-01-02 00:52:22 +00:00
Merge branch 'stable'
This commit is contained in:
commit
3cb53cc9f3
@ -361,7 +361,7 @@ class interval_set {
|
||||
|
||||
void swap(interval_set<T>& other) {
|
||||
m.swap(other.m);
|
||||
int t = _size;
|
||||
int64_t t = _size;
|
||||
_size = other._size;
|
||||
other._size = t;
|
||||
}
|
||||
|
@ -45,10 +45,10 @@ void MonMap::print(ostream& out) const
|
||||
out << "last_changed " << last_changed << "\n";
|
||||
out << "created " << created << "\n";
|
||||
unsigned i = 0;
|
||||
for (map<string,entity_addr_t>::const_iterator p = mon_addr.begin();
|
||||
p != mon_addr.end();
|
||||
for (map<entity_addr_t,string>::const_iterator p = addr_name.begin();
|
||||
p != addr_name.end();
|
||||
p++)
|
||||
out << i++ << ": " << p->second << " mon." << p->first << "\n";
|
||||
out << i++ << ": " << p->first << " mon." << p->second << "\n";
|
||||
}
|
||||
|
||||
void MonMap::dump(Formatter *f) const
|
||||
@ -59,13 +59,13 @@ void MonMap::dump(Formatter *f) const
|
||||
f->dump_stream("created") << created;
|
||||
f->open_array_section("mons");
|
||||
int i = 0;
|
||||
for (map<string,entity_addr_t>::const_iterator p = mon_addr.begin();
|
||||
p != mon_addr.end();
|
||||
for (map<entity_addr_t,string>::const_iterator p = addr_name.begin();
|
||||
p != addr_name.end();
|
||||
++p, ++i) {
|
||||
f->open_object_section("mon");
|
||||
f->dump_int("rank", i);
|
||||
f->dump_string("name", p->first);
|
||||
f->dump_stream("addr") << p->second;
|
||||
f->dump_string("name", p->second);
|
||||
f->dump_stream("addr") << p->first;
|
||||
f->close_section();
|
||||
}
|
||||
f->close_section();
|
||||
|
@ -40,6 +40,7 @@ class MonMap {
|
||||
void calc_ranks() {
|
||||
rank_name.resize(mon_addr.size());
|
||||
rank_addr.resize(mon_addr.size());
|
||||
addr_name.clear();
|
||||
for (map<string,entity_addr_t>::iterator p = mon_addr.begin();
|
||||
p != mon_addr.end();
|
||||
p++) {
|
||||
|
Loading…
Reference in New Issue
Block a user