Signed-off-by: xinxin shu <xinxin.shu@intel.com>
// -- pg_stat_t --
+bool pg_stat_t::is_acting_osd(int32_t osd, bool primary) const
+{
+ if (primary && osd == acting_primary) {
+ return true;
+ } else if (!primary) {
+ for(vector<int32_t>::const_iterator it = acting.begin();
+ it != acting.end(); it++)
+ {
+ if (*it == osd)
+ return true;
+ }
+ }
+ return false;
+}
+
void pg_stat_t::dump(Formatter *f) const
{
f->dump_stream("version") << version;
ondisk_log_size -= o.ondisk_log_size;
}
+ bool is_acting_osd(int32_t osd, bool primary) const;
void dump(Formatter *f) const;
void dump_brief(Formatter *f) const;
void encode(bufferlist &bl) const;