31#ifndef __XFS_TYPES_H__
32#define __XFS_TYPES_H__
45#define XFS_BIG_FILES 1
46#define XFS_BIG_FILESYSTEMS 1
80#if XFS_BIG_FILESYSTEMS
106#define NULLDFSBNO ((xfs_dfsbno_t)-1)
107#define NULLDRFSBNO ((xfs_drfsbno_t)-1)
108#define NULLDRTBNO ((xfs_drtbno_t)-1)
109#define NULLDFILOFF ((xfs_dfiloff_t)-1)
111#define NULLFSBLOCK ((xfs_fsblock_t)-1)
112#define NULLRFSBLOCK ((xfs_rfsblock_t)-1)
113#define NULLRTBLOCK ((xfs_rtblock_t)-1)
114#define NULLFILEOFF ((xfs_fileoff_t)-1)
116#define NULLAGBLOCK ((xfs_agblock_t)-1)
117#define NULLAGNUMBER ((xfs_agnumber_t)-1)
118#define NULLEXTNUM ((xfs_extnum_t)-1)
120#define NULLCOMMITLSN ((xfs_lsn_t)-1)
125#define MAXEXTLEN ((xfs_extlen_t)0x001fffff)
126#define MAXEXTNUM ((xfs_extnum_t)0x7fffffff)
127#define MAXAEXTNUM ((xfs_aextnum_t)0x7fff)
133#define MAXNAMELEN 256
150# define XFSSTAT_END_EXTENT_ALLOC 4
155# define XFSSTAT_END_ALLOC_BTREE (XFSSTAT_END_EXTENT_ALLOC+4)
156 uint32_t xs_abt_lookup;
157 uint32_t xs_abt_compare;
158 uint32_t xs_abt_insrec;
159 uint32_t xs_abt_delrec;
160# define XFSSTAT_END_BLOCK_MAPPING (XFSSTAT_END_ALLOC_BTREE+7)
161 uint32_t xs_blk_mapr;
162 uint32_t xs_blk_mapw;
163 uint32_t xs_blk_unmap;
164 uint32_t xs_add_exlist;
165 uint32_t xs_del_exlist;
166 uint32_t xs_look_exlist;
167 uint32_t xs_cmp_exlist;
168# define XFSSTAT_END_BLOCK_MAP_BTREE (XFSSTAT_END_BLOCK_MAPPING+4)
169 uint32_t xs_bmbt_lookup;
170 uint32_t xs_bmbt_compare;
171 uint32_t xs_bmbt_insrec;
172 uint32_t xs_bmbt_delrec;
173# define XFSSTAT_END_DIRECTORY_OPS (XFSSTAT_END_BLOCK_MAP_BTREE+4)
174 uint32_t xs_dir_lookup;
175 uint32_t xs_dir_create;
176 uint32_t xs_dir_remove;
177 uint32_t xs_dir_getdents;
178# define XFSSTAT_END_TRANSACTIONS (XFSSTAT_END_DIRECTORY_OPS+3)
179 uint32_t xs_trans_sync;
180 uint32_t xs_trans_async;
181 uint32_t xs_trans_empty;
182# define XFSSTAT_END_INODE_OPS (XFSSTAT_END_TRANSACTIONS+7)
183 uint32_t xs_ig_attempts;
184 uint32_t xs_ig_found;
185 uint32_t xs_ig_frecycle;
186 uint32_t xs_ig_missed;
188 uint32_t xs_ig_reclaims;
189 uint32_t xs_ig_attrchg;
190# define XFSSTAT_END_LOG_OPS (XFSSTAT_END_INODE_OPS+5)
191 uint32_t xs_log_writes;
192 uint32_t xs_log_blocks;
193 uint32_t xs_log_noiclogs;
194 uint32_t xs_log_force;
195 uint32_t xs_log_force_sleep;
196# define XFSSTAT_END_TAIL_PUSHING (XFSSTAT_END_LOG_OPS+10)
197 uint32_t xs_try_logspace;
198 uint32_t xs_sleep_logspace;
199 uint32_t xs_push_ail;
200 uint32_t xs_push_ail_success;
201 uint32_t xs_push_ail_pushbuf;
202 uint32_t xs_push_ail_pinned;
203 uint32_t xs_push_ail_locked;
204 uint32_t xs_push_ail_flushing;
205 uint32_t xs_push_ail_restarts;
206 uint32_t xs_push_ail_flush;
207# define XFSSTAT_END_WRITE_CONVERT (XFSSTAT_END_TAIL_PUSHING+2)
208 uint32_t xs_xstrat_quick;
209 uint32_t xs_xstrat_split;
210# define XFSSTAT_END_READ_WRITE_OPS (XFSSTAT_END_WRITE_CONVERT+2)
211 uint32_t xs_write_calls;
212 uint32_t xs_read_calls;
213# define XFSSTAT_END_ATTRIBUTE_OPS (XFSSTAT_END_READ_WRITE_OPS+4)
214 uint32_t xs_attr_get;
215 uint32_t xs_attr_set;
216 uint32_t xs_attr_remove;
217 uint32_t xs_attr_list;
218# define XFSSTAT_END_QUOTA_OPS (XFSSTAT_END_ATTRIBUTE_OPS+8)
219 uint32_t xs_qm_dqreclaims;
220 uint32_t xs_qm_dqreclaim_misses;
221 uint32_t xs_qm_dquot_dups;
222 uint32_t xs_qm_dqcachemisses;
223 uint32_t xs_qm_dqcachehits;
224 uint32_t xs_qm_dqwants;
225 uint32_t xs_qm_dqshake_reclaims;
226 uint32_t xs_qm_dqinact_reclaims;
227# define XFSSTAT_END_INODE_CLUSTER (XFSSTAT_END_QUOTA_OPS+3)
228 uint32_t xs_iflush_count;
229 uint32_t xs_icluster_flushcnt;
230 uint32_t xs_icluster_flushinode;
231# define XFSSTAT_END_VNODE_OPS (XFSSTAT_END_INODE_CLUSTER+8)
240 struct xfsstats_xpc {
241 uint64_t xs_xstrat_bytes;
242 uint64_t xs_write_bytes;
243 uint64_t xs_read_bytes;
247# define XFS_STATS_INC(count) ( xfsstats.##count ++ )
248# define XFS_STATS_DEC(count) ( xfsstats.##count -- )
249# define XFS_STATS_ADD(count, inc) ( xfsstats.##count += (inc) )
250# define XFS_STATS64_INC(count) ( xfsstats.xpc.##count ++ )
251# define XFS_STATS64_ADD(count, inc) ( xfsstats.xpc.##count += (inc) )
253# define XFS_STATS_INC(count)
254# define XFS_STATS_DEC(count)
255# define XFS_STATS_ADD(count, inc)
256# define XFS_STATS64_INC(count)
257# define XFS_STATS64_ADD(count, inc)
265#define IRIX_DEV_BITSMAJOR 14
266#define IRIX_DEV_BITSMINOR 18
267#define IRIX_DEV_MAXMAJ 0x1ff
268#define IRIX_DEV_MAXMIN 0x3ffff
269#define IRIX_DEV_MAJOR(dev) ((int)(((unsigned)(dev)>>IRIX_DEV_BITSMINOR) \
271#define IRIX_DEV_MINOR(dev) ((int)((dev)&IRIX_DEV_MAXMIN))
272#define IRIX_MKDEV(major,minor) ((xfs_dev_t)(((major)<<IRIX_DEV_BITSMINOR) \
273 | (minor&IRIX_DEV_MAXMIN)))
275#define IRIX_DEV_TO_KDEVT(dev) MKDEV(IRIX_DEV_MAJOR(dev),IRIX_DEV_MINOR(dev))
276#define IRIX_DEV_TO_DEVT(dev) ((IRIX_DEV_MAJOR(dev)<<8)|IRIX_DEV_MINOR(dev))
279#if (BITS_PER_LONG == 32)
282#elif (BITS_PER_LONG == 64)
286#error BITS_PER_LONG must be 32 or 64
int32_t xfs_extnum_t
Definition: xfs_types.h:51
int64_t xfs_fsize_t
Definition: xfs_types.h:53
uint64_t xfs_dfiloff_t
Definition: xfs_types.h:74
int64_t xfs_sfiloff_t
Definition: xfs_types.h:93
int64_t xfs_srtblock_t
Definition: xfs_types.h:84
int64_t xfs_lsn_t
Definition: xfs_types.h:59
xfs_btnum_t
Definition: xfs_types.h:139
@ XFS_BTNUM_INOi
Definition: xfs_types.h:140
@ XFS_BTNUM_BMAPi
Definition: xfs_types.h:140
@ XFS_BTNUM_CNTi
Definition: xfs_types.h:140
@ XFS_BTNUM_MAX
Definition: xfs_types.h:141
@ XFS_BTNUM_BNOi
Definition: xfs_types.h:140
xfs_lookup_t
Definition: xfs_types.h:135
@ XFS_LOOKUP_LEi
Definition: xfs_types.h:136
@ XFS_LOOKUP_GEi
Definition: xfs_types.h:136
@ XFS_LOOKUP_EQi
Definition: xfs_types.h:136
int16_t xfs_aextnum_t
Definition: xfs_types.h:52
uint32_t xfs_dahash_t
Definition: xfs_types.h:63
uint64_t xfs_drtbno_t
Definition: xfs_types.h:73
int32_t xfs_suminfo_t
Definition: xfs_types.h:56
uint64_t xfs_rfsblock_t
Definition: xfs_types.h:82
uint8_t xfs_arch_t
Definition: xfs_types.h:101
int32_t xfs_rtword_t
Definition: xfs_types.h:57
uint64_t xfs_dfilblks_t
Definition: xfs_types.h:75
int32_t xfs_tid_t
Definition: xfs_types.h:60
uint32_t xfs_agnumber_t
Definition: xfs_types.h:50
uint64_t xfs_ufsize_t
Definition: xfs_types.h:54
uint64_t xfs_dfsbno_t
Definition: xfs_types.h:71
uint64_t xfs_drfsbno_t
Definition: xfs_types.h:72
uint64_t xfs_fsblock_t
Definition: xfs_types.h:81
uint64_t xfs_fileoff_t
Definition: xfs_types.h:92
uint64_t xfs_rtblock_t
Definition: xfs_types.h:83
uint64_t xfs_filblks_t
Definition: xfs_types.h:94
uint32_t xfs_agblock_t
Definition: xfs_types.h:48
uint16_t xfs_prid_t
Definition: xfs_types.h:65
uint32_t xfs_extlen_t
Definition: xfs_types.h:49
uint32_t xfs_dablk_t
Definition: xfs_types.h:62