osd/PG: set blocked_by during peering GetInfo

Signed-off-by: Sage Weil <sage@redhat.com>
osd/PG: set blocked_by during peering GetLog

Signed-off-by: Sage Weil <sage@redhat.com>
osd/PG: set blocked_by in Incomplete state

Signed-off-by: Sage Weil <sage@redhat.com>
osd/PG: set blocked_by in GetMissing

Signed-off-by: Sage Weil <sage@redhat.com>
mon/PGMap: track histogram of pg blocked_by

Signed-off-by: Sage Weil <sage@redhat.com>
mon: add 'osd blocked-by' command

Print a histogram of how many peers are blocked by each OSD.  This is
useful for quickly diagnosing which OSDs are broken or slow and preventing
peering from completing.

In the future, we can populate the pg_stat_t with peer OSDs for more than
just peering waits, but this is a useful start.

Signed-off-by: Sage Weil <sage@redhat.com>
qa/workunits/cephtool: add simple 'ceph osd perf' test

Signed-off-by: Sage Weil <sage@redhat.com>
qa/workunits/cephtool: add trivial 'ceph osd blocked-by' test

Signed-off-by: Sage Weil <sage@redhat.com>
osd/PG: bound number of blocked_by OSDs we report per PG

We don't want to include an unbounded-sized vector of OSDs in the pg_stat_t
struct.  Cap it, and report a random subset of the actual blockers to fit
within the limit.

Signed-off-by: Sage Weil <sage@redhat.com>
osd/osd_types: s/int/int32_t/ in pg_stat_t

Signed-off-by: Sage Weil <sage@redhat.com>