.. | .. |
---|
41 | 41 | * XFS global statistics |
---|
42 | 42 | */ |
---|
43 | 43 | struct __xfsstats { |
---|
44 | | -# define XFSSTAT_END_EXTENT_ALLOC 4 |
---|
45 | 44 | uint32_t xs_allocx; |
---|
46 | 45 | uint32_t xs_allocb; |
---|
47 | 46 | uint32_t xs_freex; |
---|
48 | 47 | uint32_t xs_freeb; |
---|
49 | | -# define XFSSTAT_END_ALLOC_BTREE (XFSSTAT_END_EXTENT_ALLOC+4) |
---|
50 | 48 | uint32_t xs_abt_lookup; |
---|
51 | 49 | uint32_t xs_abt_compare; |
---|
52 | 50 | uint32_t xs_abt_insrec; |
---|
53 | 51 | uint32_t xs_abt_delrec; |
---|
54 | | -# define XFSSTAT_END_BLOCK_MAPPING (XFSSTAT_END_ALLOC_BTREE+7) |
---|
55 | 52 | uint32_t xs_blk_mapr; |
---|
56 | 53 | uint32_t xs_blk_mapw; |
---|
57 | 54 | uint32_t xs_blk_unmap; |
---|
.. | .. |
---|
59 | 56 | uint32_t xs_del_exlist; |
---|
60 | 57 | uint32_t xs_look_exlist; |
---|
61 | 58 | uint32_t xs_cmp_exlist; |
---|
62 | | -# define XFSSTAT_END_BLOCK_MAP_BTREE (XFSSTAT_END_BLOCK_MAPPING+4) |
---|
63 | 59 | uint32_t xs_bmbt_lookup; |
---|
64 | 60 | uint32_t xs_bmbt_compare; |
---|
65 | 61 | uint32_t xs_bmbt_insrec; |
---|
66 | 62 | uint32_t xs_bmbt_delrec; |
---|
67 | | -# define XFSSTAT_END_DIRECTORY_OPS (XFSSTAT_END_BLOCK_MAP_BTREE+4) |
---|
68 | 63 | uint32_t xs_dir_lookup; |
---|
69 | 64 | uint32_t xs_dir_create; |
---|
70 | 65 | uint32_t xs_dir_remove; |
---|
71 | 66 | uint32_t xs_dir_getdents; |
---|
72 | | -# define XFSSTAT_END_TRANSACTIONS (XFSSTAT_END_DIRECTORY_OPS+3) |
---|
73 | 67 | uint32_t xs_trans_sync; |
---|
74 | 68 | uint32_t xs_trans_async; |
---|
75 | 69 | uint32_t xs_trans_empty; |
---|
76 | | -# define XFSSTAT_END_INODE_OPS (XFSSTAT_END_TRANSACTIONS+7) |
---|
77 | 70 | uint32_t xs_ig_attempts; |
---|
78 | 71 | uint32_t xs_ig_found; |
---|
79 | 72 | uint32_t xs_ig_frecycle; |
---|
.. | .. |
---|
81 | 74 | uint32_t xs_ig_dup; |
---|
82 | 75 | uint32_t xs_ig_reclaims; |
---|
83 | 76 | uint32_t xs_ig_attrchg; |
---|
84 | | -# define XFSSTAT_END_LOG_OPS (XFSSTAT_END_INODE_OPS+5) |
---|
85 | 77 | uint32_t xs_log_writes; |
---|
86 | 78 | uint32_t xs_log_blocks; |
---|
87 | 79 | uint32_t xs_log_noiclogs; |
---|
88 | 80 | uint32_t xs_log_force; |
---|
89 | 81 | uint32_t xs_log_force_sleep; |
---|
90 | | -# define XFSSTAT_END_TAIL_PUSHING (XFSSTAT_END_LOG_OPS+10) |
---|
91 | 82 | uint32_t xs_try_logspace; |
---|
92 | 83 | uint32_t xs_sleep_logspace; |
---|
93 | 84 | uint32_t xs_push_ail; |
---|
.. | .. |
---|
98 | 89 | uint32_t xs_push_ail_flushing; |
---|
99 | 90 | uint32_t xs_push_ail_restarts; |
---|
100 | 91 | uint32_t xs_push_ail_flush; |
---|
101 | | -# define XFSSTAT_END_WRITE_CONVERT (XFSSTAT_END_TAIL_PUSHING+2) |
---|
102 | 92 | uint32_t xs_xstrat_quick; |
---|
103 | 93 | uint32_t xs_xstrat_split; |
---|
104 | | -# define XFSSTAT_END_READ_WRITE_OPS (XFSSTAT_END_WRITE_CONVERT+2) |
---|
105 | 94 | uint32_t xs_write_calls; |
---|
106 | 95 | uint32_t xs_read_calls; |
---|
107 | | -# define XFSSTAT_END_ATTRIBUTE_OPS (XFSSTAT_END_READ_WRITE_OPS+4) |
---|
108 | 96 | uint32_t xs_attr_get; |
---|
109 | 97 | uint32_t xs_attr_set; |
---|
110 | 98 | uint32_t xs_attr_remove; |
---|
111 | 99 | uint32_t xs_attr_list; |
---|
112 | | -# define XFSSTAT_END_INODE_CLUSTER (XFSSTAT_END_ATTRIBUTE_OPS+3) |
---|
113 | 100 | uint32_t xs_iflush_count; |
---|
114 | 101 | uint32_t xs_icluster_flushcnt; |
---|
115 | 102 | uint32_t xs_icluster_flushinode; |
---|
116 | | -# define XFSSTAT_END_VNODE_OPS (XFSSTAT_END_INODE_CLUSTER+8) |
---|
117 | 103 | uint32_t vn_active; /* # vnodes not on free lists */ |
---|
118 | 104 | uint32_t vn_alloc; /* # times vn_alloc called */ |
---|
119 | 105 | uint32_t vn_get; /* # times vn_get called */ |
---|
.. | .. |
---|
122 | 108 | uint32_t vn_reclaim; /* # times vn_reclaim called */ |
---|
123 | 109 | uint32_t vn_remove; /* # times vn_remove called */ |
---|
124 | 110 | uint32_t vn_free; /* # times vn_free called */ |
---|
125 | | -#define XFSSTAT_END_BUF (XFSSTAT_END_VNODE_OPS+9) |
---|
126 | 111 | uint32_t xb_get; |
---|
127 | 112 | uint32_t xb_create; |
---|
128 | 113 | uint32_t xb_get_locked; |
---|
.. | .. |
---|
133 | 118 | uint32_t xb_page_found; |
---|
134 | 119 | uint32_t xb_get_read; |
---|
135 | 120 | /* Version 2 btree counters */ |
---|
136 | | -#define XFSSTAT_END_ABTB_V2 (XFSSTAT_END_BUF + __XBTS_MAX) |
---|
137 | 121 | uint32_t xs_abtb_2[__XBTS_MAX]; |
---|
138 | | -#define XFSSTAT_END_ABTC_V2 (XFSSTAT_END_ABTB_V2 + __XBTS_MAX) |
---|
139 | 122 | uint32_t xs_abtc_2[__XBTS_MAX]; |
---|
140 | | -#define XFSSTAT_END_BMBT_V2 (XFSSTAT_END_ABTC_V2 + __XBTS_MAX) |
---|
141 | 123 | uint32_t xs_bmbt_2[__XBTS_MAX]; |
---|
142 | | -#define XFSSTAT_END_IBT_V2 (XFSSTAT_END_BMBT_V2 + __XBTS_MAX) |
---|
143 | 124 | uint32_t xs_ibt_2[__XBTS_MAX]; |
---|
144 | | -#define XFSSTAT_END_FIBT_V2 (XFSSTAT_END_IBT_V2 + __XBTS_MAX) |
---|
145 | 125 | uint32_t xs_fibt_2[__XBTS_MAX]; |
---|
146 | | -#define XFSSTAT_END_RMAP_V2 (XFSSTAT_END_FIBT_V2 + __XBTS_MAX) |
---|
147 | 126 | uint32_t xs_rmap_2[__XBTS_MAX]; |
---|
148 | | -#define XFSSTAT_END_REFCOUNT (XFSSTAT_END_RMAP_V2 + __XBTS_MAX) |
---|
149 | 127 | uint32_t xs_refcbt_2[__XBTS_MAX]; |
---|
150 | | -#define XFSSTAT_END_XQMSTAT (XFSSTAT_END_REFCOUNT + 6) |
---|
151 | 128 | uint32_t xs_qm_dqreclaims; |
---|
152 | 129 | uint32_t xs_qm_dqreclaim_misses; |
---|
153 | 130 | uint32_t xs_qm_dquot_dups; |
---|
154 | 131 | uint32_t xs_qm_dqcachemisses; |
---|
155 | 132 | uint32_t xs_qm_dqcachehits; |
---|
156 | 133 | uint32_t xs_qm_dqwants; |
---|
157 | | -#define XFSSTAT_END_QM (XFSSTAT_END_XQMSTAT+2) |
---|
158 | 134 | uint32_t xs_qm_dquot; |
---|
159 | 135 | uint32_t xs_qm_dquot_unused; |
---|
160 | 136 | /* Extra precision counters */ |
---|
161 | 137 | uint64_t xs_xstrat_bytes; |
---|
162 | 138 | uint64_t xs_write_bytes; |
---|
163 | 139 | uint64_t xs_read_bytes; |
---|
| 140 | + uint64_t defer_relog; |
---|
164 | 141 | }; |
---|
| 142 | + |
---|
| 143 | +#define xfsstats_offset(f) (offsetof(struct __xfsstats, f)/sizeof(uint32_t)) |
---|
165 | 144 | |
---|
166 | 145 | struct xfsstats { |
---|
167 | 146 | union { |
---|
168 | 147 | struct __xfsstats s; |
---|
169 | | - uint32_t a[XFSSTAT_END_XQMSTAT]; |
---|
| 148 | + uint32_t a[xfsstats_offset(xs_qm_dquot)]; |
---|
170 | 149 | }; |
---|
171 | 150 | }; |
---|
172 | 151 | |
---|