diff options
author | Sage Weil <sage.weil@dreamhost.com> | 2012-01-27 13:02:28 -0800 |
---|---|---|
committer | Sage Weil <sage.weil@dreamhost.com> | 2012-01-27 13:02:28 -0800 |
commit | 6e44af9fe70070767b3c1c539c789caba4683deb (patch) | |
tree | b54f7012bedfca6b574e647b6630a9d5d100bf30 | |
parent | 374fec47253bad511eee52d372f182402fb17b1a (diff) | |
download | ceph-6e44af9fe70070767b3c1c539c789caba4683deb.tar.gz |
osd: add STALE pg state bit
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
-rw-r--r-- | src/osd/osd_types.cc | 2 | ||||
-rw-r--r-- | src/osd/osd_types.h | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/src/osd/osd_types.cc b/src/osd/osd_types.cc index 9674354bc83..367c98a8963 100644 --- a/src/osd/osd_types.cc +++ b/src/osd/osd_types.cc @@ -164,6 +164,8 @@ void coll_t::decode(bufferlist::iterator& bl) std::string pg_state_string(int state) { ostringstream oss; + if (state & PG_STATE_STALE) + oss << "stale+"; if (state & PG_STATE_CREATING) oss << "creating+"; if (state & PG_STATE_ACTIVE) diff --git a/src/osd/osd_types.h b/src/osd/osd_types.h index 4090aa7a0ff..c7babe87b6b 100644 --- a/src/osd/osd_types.h +++ b/src/osd/osd_types.h @@ -505,6 +505,7 @@ inline ostream& operator<<(ostream& out, const osd_stat_t& s) { //PG_STATE_SCANNING (1<<14) .. deprecated. #define PG_STATE_BACKFILL (1<<15) // [active] backfilling pg content #define PG_STATE_INCOMPLETE (1<<16) // incomplete content, peering failed. +#define PG_STATE_STALE (1<<17) // our state for this pg is stale, unknown. std::string pg_state_string(int state); |