aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph/mdsmap.h
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2010-06-17 17:19:01 -0400
committerSage Weil <sage@newdream.net>2010-08-01 23:11:40 -0400
commit0deb01c9998f8112c5e478e3fe3a930131abbc0a (patch)
tree1b98a08ce630949268c4f26d5f232d07acb5c7ba /fs/ceph/mdsmap.h
parentcd84db6e4051a9fb7941d49d31a0193a3371fd61 (diff)
ceph: track laggy state of mds from mdsmap
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/mdsmap.h')
-rw-r--r--fs/ceph/mdsmap.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/ceph/mdsmap.h b/fs/ceph/mdsmap.h
index eacc131aa5c..4c5cb0880bb 100644
--- a/fs/ceph/mdsmap.h
+++ b/fs/ceph/mdsmap.h
@@ -13,6 +13,7 @@ struct ceph_mds_info {
13 struct ceph_entity_addr addr; 13 struct ceph_entity_addr addr;
14 s32 state; 14 s32 state;
15 int num_export_targets; 15 int num_export_targets;
16 bool laggy;
16 u32 *export_targets; 17 u32 *export_targets;
17}; 18};
18 19
@@ -47,6 +48,13 @@ static inline int ceph_mdsmap_get_state(struct ceph_mdsmap *m, int w)
47 return m->m_info[w].state; 48 return m->m_info[w].state;
48} 49}
49 50
51static inline bool ceph_mdsmap_is_laggy(struct ceph_mdsmap *m, int w)
52{
53 if (w >= 0 && w < m->m_max_mds)
54 return m->m_info[w].laggy;
55 return false;
56}
57
50extern int ceph_mdsmap_get_random_mds(struct ceph_mdsmap *m); 58extern int ceph_mdsmap_get_random_mds(struct ceph_mdsmap *m);
51extern struct ceph_mdsmap *ceph_mdsmap_decode(void **p, void *end); 59extern struct ceph_mdsmap *ceph_mdsmap_decode(void **p, void *end);
52extern void ceph_mdsmap_destroy(struct ceph_mdsmap *m); 60extern void ceph_mdsmap_destroy(struct ceph_mdsmap *m);