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

TOMOYO Linux Cross Reference
Linux/include/linux/ceph/mdsmap.h

Version: ~ [ linux-5.2 ] ~ [ linux-5.1.16 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.57 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.132 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.184 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.184 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.69 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-3.9.11 ] ~ [ linux-3.8.13 ] ~ [ linux-3.7.10 ] ~ [ linux-3.6.11 ] ~ [ linux-3.5.7 ] ~ [ linux-3.4.113 ] ~ [ linux-3.3.8 ] ~ [ linux-3.2.102 ] ~ [ linux-3.1.10 ] ~ [ linux-3.0.101 ] ~ [ linux-2.6.39.4 ] ~ [ linux-2.6.38.8 ] ~ [ linux-2.6.37.6 ] ~ [ linux-2.6.36.4 ] ~ [ linux-2.6.35.14 ] ~ [ linux-2.6.34.15 ] ~ [ linux-2.6.33.20 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 #ifndef _FS_CEPH_MDSMAP_H
  2 #define _FS_CEPH_MDSMAP_H
  3 
  4 #include <linux/bug.h>
  5 #include <linux/ceph/types.h>
  6 
  7 /*
  8  * mds map - describe servers in the mds cluster.
  9  *
 10  * we limit fields to those the client actually xcares about
 11  */
 12 struct ceph_mds_info {
 13         u64 global_id;
 14         struct ceph_entity_addr addr;
 15         s32 state;
 16         int num_export_targets;
 17         bool laggy;
 18         u32 *export_targets;
 19 };
 20 
 21 struct ceph_mdsmap {
 22         u32 m_epoch, m_client_epoch, m_last_failure;
 23         u32 m_root;
 24         u32 m_session_timeout;          /* seconds */
 25         u32 m_session_autoclose;        /* seconds */
 26         u64 m_max_file_size;
 27         u32 m_max_mds;                  /* size of m_addr, m_state arrays */
 28         struct ceph_mds_info *m_info;
 29 
 30         /* which object pools file data can be stored in */
 31         int m_num_data_pg_pools;
 32         u64 *m_data_pg_pools;
 33         u64 m_cas_pg_pool;
 34 
 35         bool m_enabled;
 36         bool m_damaged;
 37         int m_num_laggy;
 38 };
 39 
 40 static inline struct ceph_entity_addr *
 41 ceph_mdsmap_get_addr(struct ceph_mdsmap *m, int w)
 42 {
 43         if (w >= m->m_max_mds)
 44                 return NULL;
 45         return &m->m_info[w].addr;
 46 }
 47 
 48 static inline int ceph_mdsmap_get_state(struct ceph_mdsmap *m, int w)
 49 {
 50         BUG_ON(w < 0);
 51         if (w >= m->m_max_mds)
 52                 return CEPH_MDS_STATE_DNE;
 53         return m->m_info[w].state;
 54 }
 55 
 56 static inline bool ceph_mdsmap_is_laggy(struct ceph_mdsmap *m, int w)
 57 {
 58         if (w >= 0 && w < m->m_max_mds)
 59                 return m->m_info[w].laggy;
 60         return false;
 61 }
 62 
 63 extern int ceph_mdsmap_get_random_mds(struct ceph_mdsmap *m);
 64 extern struct ceph_mdsmap *ceph_mdsmap_decode(void **p, void *end);
 65 extern void ceph_mdsmap_destroy(struct ceph_mdsmap *m);
 66 extern bool ceph_mdsmap_is_cluster_available(struct ceph_mdsmap *m);
 67 
 68 #endif
 69 

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

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | 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.

osdn.jp