~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/fs/ceph/mdsmap.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /fs/ceph/mdsmap.h (Architecture i386) and /fs/ceph/mdsmap.h (Architecture mips)


  1 /* SPDX-License-Identifier: GPL-2.0 */              1 /* SPDX-License-Identifier: GPL-2.0 */
  2 #ifndef _FS_CEPH_MDSMAP_H                           2 #ifndef _FS_CEPH_MDSMAP_H
  3 #define _FS_CEPH_MDSMAP_H                           3 #define _FS_CEPH_MDSMAP_H
  4                                                     4 
  5 #include <linux/bug.h>                              5 #include <linux/bug.h>
  6 #include <linux/ceph/types.h>                       6 #include <linux/ceph/types.h>
  7                                                     7 
  8 struct ceph_mds_client;                             8 struct ceph_mds_client;
  9                                                     9 
 10 /*                                                 10 /*
 11  * mds map - describe servers in the mds clust     11  * mds map - describe servers in the mds cluster.
 12  *                                                 12  *
 13  * we limit fields to those the client actuall     13  * we limit fields to those the client actually xcares about
 14  */                                                14  */
 15 struct ceph_mds_info {                             15 struct ceph_mds_info {
 16         u64 global_id;                             16         u64 global_id;
 17         struct ceph_entity_addr addr;              17         struct ceph_entity_addr addr;
 18         s32 state;                                 18         s32 state;
 19         int num_export_targets;                    19         int num_export_targets;
 20         bool laggy;                                20         bool laggy;
 21         u32 *export_targets;                       21         u32 *export_targets;
 22 };                                                 22 };
 23                                                    23 
 24 struct ceph_mdsmap {                               24 struct ceph_mdsmap {
 25         u32 m_epoch, m_client_epoch, m_last_fa     25         u32 m_epoch, m_client_epoch, m_last_failure;
 26         u32 m_root;                                26         u32 m_root;
 27         u32 m_session_timeout;          /* sec     27         u32 m_session_timeout;          /* seconds */
 28         u32 m_session_autoclose;        /* sec     28         u32 m_session_autoclose;        /* seconds */
 29         u64 m_max_file_size;                       29         u64 m_max_file_size;
 30         /*                                         30         /*
 31          * maximum size for xattrs blob.           31          * maximum size for xattrs blob.
 32          * Zeroed by default to force the usag     32          * Zeroed by default to force the usage of the (sync) SETXATTR Op.
 33          */                                        33          */
 34         u64 m_max_xattr_size;                      34         u64 m_max_xattr_size;
 35         u32 m_max_mds;                  /* exp     35         u32 m_max_mds;                  /* expected up:active mds number */
 36         u32 m_num_active_mds;           /* act     36         u32 m_num_active_mds;           /* actual up:active mds number */
 37         u32 possible_max_rank;          /* pos     37         u32 possible_max_rank;          /* possible max rank index */
 38         struct ceph_mds_info *m_info;              38         struct ceph_mds_info *m_info;
 39                                                    39 
 40         /* which object pools file data can be     40         /* which object pools file data can be stored in */
 41         int m_num_data_pg_pools;                   41         int m_num_data_pg_pools;
 42         u64 *m_data_pg_pools;                      42         u64 *m_data_pg_pools;
 43         u64 m_cas_pg_pool;                         43         u64 m_cas_pg_pool;
 44                                                    44 
 45         bool m_enabled;                            45         bool m_enabled;
 46         bool m_damaged;                            46         bool m_damaged;
 47         int m_num_laggy;                           47         int m_num_laggy;
 48 };                                                 48 };
 49                                                    49 
 50 static inline struct ceph_entity_addr *            50 static inline struct ceph_entity_addr *
 51 ceph_mdsmap_get_addr(struct ceph_mdsmap *m, in     51 ceph_mdsmap_get_addr(struct ceph_mdsmap *m, int w)
 52 {                                                  52 {
 53         if (w >= m->possible_max_rank)             53         if (w >= m->possible_max_rank)
 54                 return NULL;                       54                 return NULL;
 55         return &m->m_info[w].addr;                 55         return &m->m_info[w].addr;
 56 }                                                  56 }
 57                                                    57 
 58 static inline int ceph_mdsmap_get_state(struct     58 static inline int ceph_mdsmap_get_state(struct ceph_mdsmap *m, int w)
 59 {                                                  59 {
 60         BUG_ON(w < 0);                             60         BUG_ON(w < 0);
 61         if (w >= m->possible_max_rank)             61         if (w >= m->possible_max_rank)
 62                 return CEPH_MDS_STATE_DNE;         62                 return CEPH_MDS_STATE_DNE;
 63         return m->m_info[w].state;                 63         return m->m_info[w].state;
 64 }                                                  64 }
 65                                                    65 
 66 static inline bool ceph_mdsmap_is_laggy(struct     66 static inline bool ceph_mdsmap_is_laggy(struct ceph_mdsmap *m, int w)
 67 {                                                  67 {
 68         if (w >= 0 && w < m->possible_max_rank     68         if (w >= 0 && w < m->possible_max_rank)
 69                 return m->m_info[w].laggy;         69                 return m->m_info[w].laggy;
 70         return false;                              70         return false;
 71 }                                                  71 }
 72                                                    72 
 73 extern int ceph_mdsmap_get_random_mds(struct c     73 extern int ceph_mdsmap_get_random_mds(struct ceph_mdsmap *m);
 74 struct ceph_mdsmap *ceph_mdsmap_decode(struct      74 struct ceph_mdsmap *ceph_mdsmap_decode(struct ceph_mds_client *mdsc, void **p,
 75                                        void *e     75                                        void *end, bool msgr2);
 76 extern void ceph_mdsmap_destroy(struct ceph_md     76 extern void ceph_mdsmap_destroy(struct ceph_mdsmap *m);
 77 extern bool ceph_mdsmap_is_cluster_available(s     77 extern bool ceph_mdsmap_is_cluster_available(struct ceph_mdsmap *m);
 78                                                    78 
 79 #endif                                             79 #endif
 80                                                    80 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php