]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: add STALE pg state bit
authorSage Weil <sage.weil@dreamhost.com>
Fri, 27 Jan 2012 21:02:28 +0000 (13:02 -0800)
committerSage Weil <sage.weil@dreamhost.com>
Fri, 27 Jan 2012 21:02:28 +0000 (13:02 -0800)
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
src/osd/osd_types.cc
src/osd/osd_types.h

index 9674354bc8316e1f270a4cabb6b58b5b1016e240..367c98a8963b9505aa05cb55624f2ddb8357802a 100644 (file)
@@ -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)
index 4090aa7a0ffe35e73c43f599dca9d2d29e3e9c0a..c7babe87b6b18dba5403651f2199ee24730782f2 100644 (file)
@@ -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);