hc
2023-12-08 01573e231f18eb2d99162747186f59511f56b64d
kernel/include/linux/ceph/mdsmap.h
....@@ -25,8 +25,9 @@
2525 u32 m_session_timeout; /* seconds */
2626 u32 m_session_autoclose; /* seconds */
2727 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 */
3031 struct ceph_mds_info *m_info;
3132
3233 /* which object pools file data can be stored in */
....@@ -42,7 +43,7 @@
4243 static inline struct ceph_entity_addr *
4344 ceph_mdsmap_get_addr(struct ceph_mdsmap *m, int w)
4445 {
45
- if (w >= m->m_num_mds)
46
+ if (w >= m->possible_max_rank)
4647 return NULL;
4748 return &m->m_info[w].addr;
4849 }
....@@ -50,14 +51,14 @@
5051 static inline int ceph_mdsmap_get_state(struct ceph_mdsmap *m, int w)
5152 {
5253 BUG_ON(w < 0);
53
- if (w >= m->m_num_mds)
54
+ if (w >= m->possible_max_rank)
5455 return CEPH_MDS_STATE_DNE;
5556 return m->m_info[w].state;
5657 }
5758
5859 static inline bool ceph_mdsmap_is_laggy(struct ceph_mdsmap *m, int w)
5960 {
60
- if (w >= 0 && w < m->m_num_mds)
61
+ if (w >= 0 && w < m->possible_max_rank)
6162 return m->m_info[w].laggy;
6263 return false;
6364 }