Keep a PG member for OSDs that current block us, and fill it into the
stats struct when we publish. Use a vector<int> in pg_stats_t to limit the
overhead (memory, decoding) on this list once it is static.
Signed-off-by: Sage Weil <sage@redhat.com>
_update_calc_stats();
+ info.stats.blocked_by.clear();
+ info.stats.blocked_by.resize(blocked_by.size());
+ unsigned pos = 0;
+ for (set<int>::iterator p = blocked_by.begin(); p != blocked_by.end(); ++p)
+ info.stats.blocked_by[pos++] = *p;
+
pg_stats_publish_valid = true;
pg_stats_publish = info.stats;
pg_stats_publish.stats.add(unstable_stats);
eversion_t min_last_complete_ondisk; // up: min over last_complete_ondisk, peer_last_complete_ondisk
eversion_t pg_trim_to;
+ set<int> blocked_by; ///< osds we are blocked by (for pg stats)
+
// [primary only] content recovery state
protected:
struct PriorSet {