.. | .. |
---|
25 | 25 | u32 m_session_timeout; /* seconds */ |
---|
26 | 26 | u32 m_session_autoclose; /* seconds */ |
---|
27 | 27 | u64 m_max_file_size; |
---|
28 | | - u32 m_max_mds; /* size of m_addr, m_state arrays */ |
---|
29 | | - int m_num_mds; |
---|
| 28 | + u32 m_max_mds; /* expected up:active mds number */ |
---|
| 29 | + u32 m_num_active_mds; /* actual up:active mds number */ |
---|
| 30 | + u32 possible_max_rank; /* possible max rank index */ |
---|
30 | 31 | struct ceph_mds_info *m_info; |
---|
31 | 32 | |
---|
32 | 33 | /* which object pools file data can be stored in */ |
---|
.. | .. |
---|
42 | 43 | static inline struct ceph_entity_addr * |
---|
43 | 44 | ceph_mdsmap_get_addr(struct ceph_mdsmap *m, int w) |
---|
44 | 45 | { |
---|
45 | | - if (w >= m->m_num_mds) |
---|
| 46 | + if (w >= m->possible_max_rank) |
---|
46 | 47 | return NULL; |
---|
47 | 48 | return &m->m_info[w].addr; |
---|
48 | 49 | } |
---|
.. | .. |
---|
50 | 51 | static inline int ceph_mdsmap_get_state(struct ceph_mdsmap *m, int w) |
---|
51 | 52 | { |
---|
52 | 53 | BUG_ON(w < 0); |
---|
53 | | - if (w >= m->m_num_mds) |
---|
| 54 | + if (w >= m->possible_max_rank) |
---|
54 | 55 | return CEPH_MDS_STATE_DNE; |
---|
55 | 56 | return m->m_info[w].state; |
---|
56 | 57 | } |
---|
57 | 58 | |
---|
58 | 59 | static inline bool ceph_mdsmap_is_laggy(struct ceph_mdsmap *m, int w) |
---|
59 | 60 | { |
---|
60 | | - if (w >= 0 && w < m->m_num_mds) |
---|
| 61 | + if (w >= 0 && w < m->possible_max_rank) |
---|
61 | 62 | return m->m_info[w].laggy; |
---|
62 | 63 | return false; |
---|
63 | 64 | } |
---|