From: John Spray Date: Fri, 13 Mar 2015 21:06:39 +0000 (-0400) Subject: mds: add `damaged` set to MDSMap X-Git-Tag: v9.0.0~113^2~14 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9c5af9f9e31a00501bee31faa2f95a4abb8ec6f9;p=ceph.git mds: add `damaged` set to MDSMap To track which ranks have been reported in state DAMAGED by an MDS daemon. Signed-off-by: John Spray --- diff --git a/src/mds/MDSMap.cc b/src/mds/MDSMap.cc index 831e236b67d0..aadf853d7a4c 100644 --- a/src/mds/MDSMap.cc +++ b/src/mds/MDSMap.cc @@ -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); } diff --git a/src/mds/MDSMap.h b/src/mds/MDSMap.h index 22cb01021a2d..481641e30ca5 100644 --- a/src/mds/MDSMap.h +++ b/src/mds/MDSMap.h @@ -198,7 +198,8 @@ protected: std::set in; // currently defined cluster std::map inc; // most recent incarnation. - std::set failed, stopped; // which roles are failed or stopped + // which ranks are failed, stopped, damaged (i.e. not held by a daemon) + std::set failed, stopped, damaged; std::map up; // who is in those roles std::map mds_info;