]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: add `damaged` set to MDSMap
authorJohn Spray <john.spray@redhat.com>
Fri, 13 Mar 2015 21:06:39 +0000 (17:06 -0400)
committerJohn Spray <john.spray@redhat.com>
Mon, 23 Mar 2015 10:55:07 +0000 (10:55 +0000)
To track which ranks have been reported in state
DAMAGED by an MDS daemon.

Signed-off-by: John Spray <john.spray@redhat.com>
src/mds/MDSMap.cc
src/mds/MDSMap.h

index 831e236b67d07c6256e9a2b628ac082ceeaf6e04..aadf853d7a4c971d2d5e4688d45b6c6ecb7b4e75 100644 (file)
@@ -499,7 +499,7 @@ void MDSMap::encode(bufferlist& bl, uint64_t features) const
   ::encode(cas_pool, bl);
 
   // kclient ignores everything from here
-  __u16 ev = 8;
+  __u16 ev = 9;
   ::encode(ev, bl);
   ::encode(compat, bl);
   ::encode(metadata_pool, bl);
@@ -517,6 +517,7 @@ void MDSMap::encode(bufferlist& bl, uint64_t features) const
   ::encode(inline_data_enabled, bl);
   ::encode(enabled, bl);
   ::encode(fs_name, bl);
+  ::encode(damaged, bl);
   ENCODE_FINISH(bl);
 }
 
@@ -598,5 +599,9 @@ void MDSMap::decode(bufferlist::iterator& p)
       enabled = false;
     }
   }
+
+  if (ev >= 9) {
+    ::decode(damaged, p);
+  }
   DECODE_FINISH(p);
 }
index 22cb01021a2d96286d97c6d9a97cff74673e44c6..481641e30ca5e4c36eb7fcf5d5f20509193930af 100644 (file)
@@ -198,7 +198,8 @@ protected:
 
   std::set<mds_rank_t> in;              // currently defined cluster
   std::map<mds_rank_t,int32_t> inc;     // most recent incarnation.
-  std::set<mds_rank_t> failed, stopped; // which roles are failed or stopped
+  // which ranks are failed, stopped, damaged (i.e. not held by a daemon)
+  std::set<mds_rank_t> failed, stopped, damaged;
   std::map<mds_rank_t, mds_gid_t> up;        // who is in those roles
   std::map<mds_gid_t, mds_info_t> mds_info;