It is useful to know how big the pg_temp map is. Strictly speaking
this is part of the OSDMap so I'm including it here. It looks like
this:
osdmap e25: 3 osds: 3 up, 3 in; 1 remapped pgs
It might be more user-friendly to put it in a line with the pgmap
somewhere (where other pg counts are included), but it doesn't quite
fit there either. So sticking with where it lives in the data
structure!
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit
db06582a067439a57e0d7f0da2193fc479736200)
f->dump_int("num_in_osds", get_num_in_osds());
f->dump_bool("full", test_flag(CEPH_OSDMAP_FULL) ? true : false);
f->dump_bool("nearfull", test_flag(CEPH_OSDMAP_NEARFULL) ? true : false);
+ f->dump_unsigned("num_remapped_pgs", get_num_pg_temp());
f->close_section();
} else {
out << " osdmap e" << get_epoch() << ": "
<< get_num_osds() << " osds: "
<< get_num_up_osds() << " up, "
- << get_num_in_osds() << " in\n";
+ << get_num_in_osds() << " in";
+ if (get_num_pg_temp())
+ out << "; " << get_num_pg_temp() << " remapped pgs";
+ out << "\n";
if (flags)
out << " flags " << get_flag_string() << "\n";
}
void get_up_osds(set<int32_t>& ls) const;
unsigned get_num_up_osds() const;
unsigned get_num_in_osds() const;
+ unsigned get_num_pg_temp() const {
+ return pg_temp->size();
+ }
int get_flags() const { return flags; }
int test_flag(int f) const { return flags & f; }