osd: num_objects_misplaced

Signed-off-by: Sage Weil <sage@inktank.com>
mon: warn about misplaced objects, just like degraded

Signed-off-by: Sage Weil <sage@redhat.com>
librados: approximate legacy 'degraded' value

The librados API returns a degraded count and no misplaced count.  Sum them
to approximate the old behavior.

Signed-off-by: Sage Weil <sage@redhat.com>
osd/PG: account for misplaces separately than degraded

A degraded object does not have enough replicas or shards, while a
misplaced object is not stored in the correct place.  Account for them
separately.

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

This is a distinct concept from degraded.

Signed-off-by: Sage Weil <sage@redhat.com>
osd/PG: track PG_STATE_UNDERSIZED separately from DEGRADED

DEGRADED means there are objects without complete reduncancy; also check
for needs_recovery().

UNDERSIZED means acting set is too small.

Signed-off-by: Sage Weil <sage@redhat.com>
osd/osd_types: add last_undegraded, last_undersized to pg_stat_t

Keep track of the last time the PG was known to not be degraded or
undersized.

Signed-off-by: Sage Weil <sage@redhat.com>
osd: track last_undegraded pg stat

Signed-off-by: Sage Weil <sage@redhat.com>
osd: track last_fullsized in pg_stat_t

Signed-off-by: Sage Weil <sage@redhat.com>
mon: track pgs that get stuck degraded

Signed-off-by: Sage Weil <sage@redhat.com>
mon: track stuck undersized

Signed-off-by: Sage Weil <sage@redhat.com>
vstart.sh: make filestore fd cache size smaller

I hit the fd limit on a vstart cluster with the default 128; reduce this
to 16.

Signed-off-by: Sage Weil <sage@redhat.com>
Merge pull request #2010 from ceph/wip-misplaced

osd: track misplaced objects separately from degraded objects

Reviewed-by: Samuel Just <sam.just@inktank.com>