}
// osd stat
+ dout(10) << " got " << stats->osd_stat << dendl;
+ pending_inc.osd_stat_updates[from] = stats->osd_stat;
+
+ // apply to live map too (screw consistency)
if (pg_map.osd_stat.count(from))
pg_map.stat_osd_sub(pg_map.osd_stat[from]);
pg_map.osd_stat[from] = stats->osd_stat;
m->osd_stat.num_blocks = stbuf.f_blocks;
m->osd_stat.num_blocks_avail = stbuf.f_bavail;
m->osd_stat.num_objects = stbuf.f_files;
+ dout(20) << " osd_stat " << m->osd_stat << dendl;
int mon = monmap->pick_mon();
messenger->send_message(m, monmap->get_inst(mon));
WRITE_CLASS_ENCODER(osd_stat_t)
+inline ostream& operator<<(ostream& out, const osd_stat_t& s) {
+ return out << "osd_stat(" << (s.num_blocks-s.num_blocks_avail) << "/" << s.num_blocks << " used, "
+ << s.num_objects << " objects)";
+}
+
/*
* pg states