hc
2024-02-19 151fecfb72a0d602dfe79790602ef64b4e241574
kernel/fs/xfs/xfs_stats.h
....@@ -41,17 +41,14 @@
4141 * XFS global statistics
4242 */
4343 struct __xfsstats {
44
-# define XFSSTAT_END_EXTENT_ALLOC 4
4544 uint32_t xs_allocx;
4645 uint32_t xs_allocb;
4746 uint32_t xs_freex;
4847 uint32_t xs_freeb;
49
-# define XFSSTAT_END_ALLOC_BTREE (XFSSTAT_END_EXTENT_ALLOC+4)
5048 uint32_t xs_abt_lookup;
5149 uint32_t xs_abt_compare;
5250 uint32_t xs_abt_insrec;
5351 uint32_t xs_abt_delrec;
54
-# define XFSSTAT_END_BLOCK_MAPPING (XFSSTAT_END_ALLOC_BTREE+7)
5552 uint32_t xs_blk_mapr;
5653 uint32_t xs_blk_mapw;
5754 uint32_t xs_blk_unmap;
....@@ -59,21 +56,17 @@
5956 uint32_t xs_del_exlist;
6057 uint32_t xs_look_exlist;
6158 uint32_t xs_cmp_exlist;
62
-# define XFSSTAT_END_BLOCK_MAP_BTREE (XFSSTAT_END_BLOCK_MAPPING+4)
6359 uint32_t xs_bmbt_lookup;
6460 uint32_t xs_bmbt_compare;
6561 uint32_t xs_bmbt_insrec;
6662 uint32_t xs_bmbt_delrec;
67
-# define XFSSTAT_END_DIRECTORY_OPS (XFSSTAT_END_BLOCK_MAP_BTREE+4)
6863 uint32_t xs_dir_lookup;
6964 uint32_t xs_dir_create;
7065 uint32_t xs_dir_remove;
7166 uint32_t xs_dir_getdents;
72
-# define XFSSTAT_END_TRANSACTIONS (XFSSTAT_END_DIRECTORY_OPS+3)
7367 uint32_t xs_trans_sync;
7468 uint32_t xs_trans_async;
7569 uint32_t xs_trans_empty;
76
-# define XFSSTAT_END_INODE_OPS (XFSSTAT_END_TRANSACTIONS+7)
7770 uint32_t xs_ig_attempts;
7871 uint32_t xs_ig_found;
7972 uint32_t xs_ig_frecycle;
....@@ -81,13 +74,11 @@
8174 uint32_t xs_ig_dup;
8275 uint32_t xs_ig_reclaims;
8376 uint32_t xs_ig_attrchg;
84
-# define XFSSTAT_END_LOG_OPS (XFSSTAT_END_INODE_OPS+5)
8577 uint32_t xs_log_writes;
8678 uint32_t xs_log_blocks;
8779 uint32_t xs_log_noiclogs;
8880 uint32_t xs_log_force;
8981 uint32_t xs_log_force_sleep;
90
-# define XFSSTAT_END_TAIL_PUSHING (XFSSTAT_END_LOG_OPS+10)
9182 uint32_t xs_try_logspace;
9283 uint32_t xs_sleep_logspace;
9384 uint32_t xs_push_ail;
....@@ -98,22 +89,17 @@
9889 uint32_t xs_push_ail_flushing;
9990 uint32_t xs_push_ail_restarts;
10091 uint32_t xs_push_ail_flush;
101
-# define XFSSTAT_END_WRITE_CONVERT (XFSSTAT_END_TAIL_PUSHING+2)
10292 uint32_t xs_xstrat_quick;
10393 uint32_t xs_xstrat_split;
104
-# define XFSSTAT_END_READ_WRITE_OPS (XFSSTAT_END_WRITE_CONVERT+2)
10594 uint32_t xs_write_calls;
10695 uint32_t xs_read_calls;
107
-# define XFSSTAT_END_ATTRIBUTE_OPS (XFSSTAT_END_READ_WRITE_OPS+4)
10896 uint32_t xs_attr_get;
10997 uint32_t xs_attr_set;
11098 uint32_t xs_attr_remove;
11199 uint32_t xs_attr_list;
112
-# define XFSSTAT_END_INODE_CLUSTER (XFSSTAT_END_ATTRIBUTE_OPS+3)
113100 uint32_t xs_iflush_count;
114101 uint32_t xs_icluster_flushcnt;
115102 uint32_t xs_icluster_flushinode;
116
-# define XFSSTAT_END_VNODE_OPS (XFSSTAT_END_INODE_CLUSTER+8)
117103 uint32_t vn_active; /* # vnodes not on free lists */
118104 uint32_t vn_alloc; /* # times vn_alloc called */
119105 uint32_t vn_get; /* # times vn_get called */
....@@ -122,7 +108,6 @@
122108 uint32_t vn_reclaim; /* # times vn_reclaim called */
123109 uint32_t vn_remove; /* # times vn_remove called */
124110 uint32_t vn_free; /* # times vn_free called */
125
-#define XFSSTAT_END_BUF (XFSSTAT_END_VNODE_OPS+9)
126111 uint32_t xb_get;
127112 uint32_t xb_create;
128113 uint32_t xb_get_locked;
....@@ -133,40 +118,34 @@
133118 uint32_t xb_page_found;
134119 uint32_t xb_get_read;
135120 /* Version 2 btree counters */
136
-#define XFSSTAT_END_ABTB_V2 (XFSSTAT_END_BUF + __XBTS_MAX)
137121 uint32_t xs_abtb_2[__XBTS_MAX];
138
-#define XFSSTAT_END_ABTC_V2 (XFSSTAT_END_ABTB_V2 + __XBTS_MAX)
139122 uint32_t xs_abtc_2[__XBTS_MAX];
140
-#define XFSSTAT_END_BMBT_V2 (XFSSTAT_END_ABTC_V2 + __XBTS_MAX)
141123 uint32_t xs_bmbt_2[__XBTS_MAX];
142
-#define XFSSTAT_END_IBT_V2 (XFSSTAT_END_BMBT_V2 + __XBTS_MAX)
143124 uint32_t xs_ibt_2[__XBTS_MAX];
144
-#define XFSSTAT_END_FIBT_V2 (XFSSTAT_END_IBT_V2 + __XBTS_MAX)
145125 uint32_t xs_fibt_2[__XBTS_MAX];
146
-#define XFSSTAT_END_RMAP_V2 (XFSSTAT_END_FIBT_V2 + __XBTS_MAX)
147126 uint32_t xs_rmap_2[__XBTS_MAX];
148
-#define XFSSTAT_END_REFCOUNT (XFSSTAT_END_RMAP_V2 + __XBTS_MAX)
149127 uint32_t xs_refcbt_2[__XBTS_MAX];
150
-#define XFSSTAT_END_XQMSTAT (XFSSTAT_END_REFCOUNT + 6)
151128 uint32_t xs_qm_dqreclaims;
152129 uint32_t xs_qm_dqreclaim_misses;
153130 uint32_t xs_qm_dquot_dups;
154131 uint32_t xs_qm_dqcachemisses;
155132 uint32_t xs_qm_dqcachehits;
156133 uint32_t xs_qm_dqwants;
157
-#define XFSSTAT_END_QM (XFSSTAT_END_XQMSTAT+2)
158134 uint32_t xs_qm_dquot;
159135 uint32_t xs_qm_dquot_unused;
160136 /* Extra precision counters */
161137 uint64_t xs_xstrat_bytes;
162138 uint64_t xs_write_bytes;
163139 uint64_t xs_read_bytes;
140
+ uint64_t defer_relog;
164141 };
142
+
143
+#define xfsstats_offset(f) (offsetof(struct __xfsstats, f)/sizeof(uint32_t))
165144
166145 struct xfsstats {
167146 union {
168147 struct __xfsstats s;
169
- uint32_t a[XFSSTAT_END_XQMSTAT];
148
+ uint32_t a[xfsstats_offset(xs_qm_dquot)];
170149 };
171150 };
172151