xfs_dinode.h 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418
  1. /*
  2. * Copyright (c) 2000, 2002 Silicon Graphics, Inc. All Rights Reserved.
  3. *
  4. * This program is free software; you can redistribute it and/or modify it
  5. * under the terms of version 2 of the GNU General Public License as
  6. * published by the Free Software Foundation.
  7. *
  8. * This program is distributed in the hope that it would be useful, but
  9. * WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11. *
  12. * Further, this software is distributed without any warranty that it is
  13. * free of the rightful claim of any third person regarding infringement
  14. * or the like. Any license provided herein, whether implied or
  15. * otherwise, applies only to this software file. Patent licenses, if
  16. * any, provided herein do not apply to combinations of this program with
  17. * other software, or any other product whatsoever.
  18. *
  19. * You should have received a copy of the GNU General Public License along
  20. * with this program; if not, write the Free Software Foundation, Inc., 59
  21. * Temple Place - Suite 330, Boston MA 02111-1307, USA.
  22. *
  23. * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
  24. * Mountain View, CA 94043, or:
  25. *
  26. * http://www.sgi.com
  27. *
  28. * For further information regarding this notice, see:
  29. *
  30. * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
  31. */
  32. #ifndef __XFS_DINODE_H__
  33. #define __XFS_DINODE_H__
  34. struct xfs_buf;
  35. struct xfs_mount;
  36. #define XFS_DINODE_VERSION_1 1
  37. #define XFS_DINODE_VERSION_2 2
  38. #if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DINODE_GOOD_VERSION)
  39. int xfs_dinode_good_version(int v);
  40. #define XFS_DINODE_GOOD_VERSION(v) xfs_dinode_good_version(v)
  41. #else
  42. #define XFS_DINODE_GOOD_VERSION(v) (((v) == XFS_DINODE_VERSION_1) || \
  43. ((v) == XFS_DINODE_VERSION_2))
  44. #endif
  45. #define XFS_DINODE_MAGIC 0x494e /* 'IN' */
  46. /*
  47. * Disk inode structure.
  48. * This is just the header; the inode is expanded to fill a variable size
  49. * with the last field expanding. It is split into the core and "other"
  50. * because we only need the core part in the in-core inode.
  51. */
  52. typedef struct xfs_timestamp {
  53. __int32_t t_sec; /* timestamp seconds */
  54. __int32_t t_nsec; /* timestamp nanoseconds */
  55. } xfs_timestamp_t;
  56. /*
  57. * Note: Coordinate changes to this structure with the XFS_DI_* #defines
  58. * below and the offsets table in xfs_ialloc_log_di().
  59. */
  60. typedef struct xfs_dinode_core
  61. {
  62. __uint16_t di_magic; /* inode magic # = XFS_DINODE_MAGIC */
  63. __uint16_t di_mode; /* mode and type of file */
  64. __int8_t di_version; /* inode version */
  65. __int8_t di_format; /* format of di_c data */
  66. __uint16_t di_onlink; /* old number of links to file */
  67. __uint32_t di_uid; /* owner's user id */
  68. __uint32_t di_gid; /* owner's group id */
  69. __uint32_t di_nlink; /* number of links to file */
  70. __uint16_t di_projid; /* owner's project id */
  71. __uint8_t di_pad[8]; /* unused, zeroed space */
  72. __uint16_t di_flushiter; /* incremented on flush */
  73. xfs_timestamp_t di_atime; /* time last accessed */
  74. xfs_timestamp_t di_mtime; /* time last modified */
  75. xfs_timestamp_t di_ctime; /* time created/inode modified */
  76. xfs_fsize_t di_size; /* number of bytes in file */
  77. xfs_drfsbno_t di_nblocks; /* # of direct & btree blocks used */
  78. xfs_extlen_t di_extsize; /* basic/minimum extent size for file */
  79. xfs_extnum_t di_nextents; /* number of extents in data fork */
  80. xfs_aextnum_t di_anextents; /* number of extents in attribute fork*/
  81. __uint8_t di_forkoff; /* attr fork offs, <<3 for 64b align */
  82. __int8_t di_aformat; /* format of attr fork's data */
  83. __uint32_t di_dmevmask; /* DMIG event mask */
  84. __uint16_t di_dmstate; /* DMIG state info */
  85. __uint16_t di_flags; /* random flags, XFS_DIFLAG_... */
  86. __uint32_t di_gen; /* generation number */
  87. } xfs_dinode_core_t;
  88. #define DI_MAX_FLUSH 0xffff
  89. typedef struct xfs_dinode
  90. {
  91. xfs_dinode_core_t di_core;
  92. /*
  93. * In adding anything between the core and the union, be
  94. * sure to update the macros like XFS_LITINO below and
  95. * XFS_BMAP_RBLOCK_DSIZE in xfs_bmap_btree.h.
  96. */
  97. xfs_agino_t di_next_unlinked;/* agi unlinked list ptr */
  98. union {
  99. xfs_bmdr_block_t di_bmbt; /* btree root block */
  100. xfs_bmbt_rec_32_t di_bmx[1]; /* extent list */
  101. xfs_dir_shortform_t di_dirsf; /* shortform directory */
  102. xfs_dir2_sf_t di_dir2sf; /* shortform directory v2 */
  103. char di_c[1]; /* local contents */
  104. xfs_dev_t di_dev; /* device for S_IFCHR/S_IFBLK */
  105. uuid_t di_muuid; /* mount point value */
  106. char di_symlink[1]; /* local symbolic link */
  107. } di_u;
  108. union {
  109. xfs_bmdr_block_t di_abmbt; /* btree root block */
  110. xfs_bmbt_rec_32_t di_abmx[1]; /* extent list */
  111. xfs_attr_shortform_t di_attrsf; /* shortform attribute list */
  112. } di_a;
  113. } xfs_dinode_t;
  114. /*
  115. * The 32 bit link count in the inode theoretically maxes out at UINT_MAX.
  116. * Since the pathconf interface is signed, we use 2^31 - 1 instead.
  117. * The old inode format had a 16 bit link count, so its maximum is USHRT_MAX.
  118. */
  119. #define XFS_MAXLINK ((1U << 31) - 1U)
  120. #define XFS_MAXLINK_1 65535U
  121. /*
  122. * Bit names for logging disk inodes only
  123. */
  124. #define XFS_DI_MAGIC 0x0000001
  125. #define XFS_DI_MODE 0x0000002
  126. #define XFS_DI_VERSION 0x0000004
  127. #define XFS_DI_FORMAT 0x0000008
  128. #define XFS_DI_ONLINK 0x0000010
  129. #define XFS_DI_UID 0x0000020
  130. #define XFS_DI_GID 0x0000040
  131. #define XFS_DI_NLINK 0x0000080
  132. #define XFS_DI_PROJID 0x0000100
  133. #define XFS_DI_PAD 0x0000200
  134. #define XFS_DI_ATIME 0x0000400
  135. #define XFS_DI_MTIME 0x0000800
  136. #define XFS_DI_CTIME 0x0001000
  137. #define XFS_DI_SIZE 0x0002000
  138. #define XFS_DI_NBLOCKS 0x0004000
  139. #define XFS_DI_EXTSIZE 0x0008000
  140. #define XFS_DI_NEXTENTS 0x0010000
  141. #define XFS_DI_NAEXTENTS 0x0020000
  142. #define XFS_DI_FORKOFF 0x0040000
  143. #define XFS_DI_AFORMAT 0x0080000
  144. #define XFS_DI_DMEVMASK 0x0100000
  145. #define XFS_DI_DMSTATE 0x0200000
  146. #define XFS_DI_FLAGS 0x0400000
  147. #define XFS_DI_GEN 0x0800000
  148. #define XFS_DI_NEXT_UNLINKED 0x1000000
  149. #define XFS_DI_U 0x2000000
  150. #define XFS_DI_A 0x4000000
  151. #define XFS_DI_NUM_BITS 27
  152. #define XFS_DI_ALL_BITS ((1 << XFS_DI_NUM_BITS) - 1)
  153. #define XFS_DI_CORE_BITS (XFS_DI_ALL_BITS & ~(XFS_DI_U|XFS_DI_A))
  154. /*
  155. * Values for di_format
  156. */
  157. typedef enum xfs_dinode_fmt
  158. {
  159. XFS_DINODE_FMT_DEV, /* CHR, BLK: di_dev */
  160. XFS_DINODE_FMT_LOCAL, /* DIR, REG: di_c */
  161. /* LNK: di_symlink */
  162. XFS_DINODE_FMT_EXTENTS, /* DIR, REG, LNK: di_bmx */
  163. XFS_DINODE_FMT_BTREE, /* DIR, REG, LNK: di_bmbt */
  164. XFS_DINODE_FMT_UUID /* MNT: di_uuid */
  165. } xfs_dinode_fmt_t;
  166. /*
  167. * Inode minimum and maximum sizes.
  168. */
  169. #define XFS_DINODE_MIN_LOG 8
  170. #define XFS_DINODE_MAX_LOG 11
  171. #define XFS_DINODE_MIN_SIZE (1 << XFS_DINODE_MIN_LOG)
  172. #define XFS_DINODE_MAX_SIZE (1 << XFS_DINODE_MAX_LOG)
  173. /*
  174. * Inode size for given fs.
  175. */
  176. #if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_LITINO)
  177. int xfs_litino(struct xfs_mount *mp);
  178. #define XFS_LITINO(mp) xfs_litino(mp)
  179. #else
  180. #define XFS_LITINO(mp) ((mp)->m_litino)
  181. #endif
  182. #define XFS_BROOT_SIZE_ADJ \
  183. (sizeof(xfs_bmbt_block_t) - sizeof(xfs_bmdr_block_t))
  184. /*
  185. * Fork identifiers. Here so utilities can use them without including
  186. * xfs_inode.h.
  187. */
  188. #define XFS_DATA_FORK 0
  189. #define XFS_ATTR_FORK 1
  190. /*
  191. * Inode data & attribute fork sizes, per inode.
  192. */
  193. #if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_CFORK_Q)
  194. int xfs_cfork_q_disk(xfs_dinode_core_t *dcp);
  195. int xfs_cfork_q(xfs_dinode_core_t *dcp);
  196. #define XFS_CFORK_Q_DISK(dcp) xfs_cfork_q_disk(dcp)
  197. #define XFS_CFORK_Q(dcp) xfs_cfork_q(dcp)
  198. #else
  199. #define XFS_CFORK_Q_DISK(dcp) ((dcp)->di_forkoff != 0)
  200. #define XFS_CFORK_Q(dcp) ((dcp)->di_forkoff != 0)
  201. #endif
  202. #if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_CFORK_BOFF)
  203. int xfs_cfork_boff_disk(xfs_dinode_core_t *dcp);
  204. int xfs_cfork_boff(xfs_dinode_core_t *dcp);
  205. #define XFS_CFORK_BOFF_DISK(dcp) xfs_cfork_boff_disk(dcp)
  206. #define XFS_CFORK_BOFF(dcp) xfs_cfork_boff(dcp)
  207. #else
  208. #define XFS_CFORK_BOFF_DISK(dcp) ((int)(INT_GET((dcp)->di_forkoff, ARCH_CONVERT) << 3))
  209. #define XFS_CFORK_BOFF(dcp) ((int)((dcp)->di_forkoff << 3))
  210. #endif
  211. #if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_CFORK_DSIZE)
  212. int xfs_cfork_dsize_disk(xfs_dinode_core_t *dcp, struct xfs_mount *mp);
  213. int xfs_cfork_dsize(xfs_dinode_core_t *dcp, struct xfs_mount *mp);
  214. #define XFS_CFORK_DSIZE_DISK(dcp,mp) xfs_cfork_dsize_disk(dcp,mp)
  215. #define XFS_CFORK_DSIZE(dcp,mp) xfs_cfork_dsize(dcp,mp)
  216. #else
  217. #define XFS_CFORK_DSIZE_DISK(dcp,mp) \
  218. (XFS_CFORK_Q_DISK(dcp) ? XFS_CFORK_BOFF_DISK(dcp) : XFS_LITINO(mp))
  219. #define XFS_CFORK_DSIZE(dcp,mp) \
  220. (XFS_CFORK_Q(dcp) ? XFS_CFORK_BOFF(dcp) : XFS_LITINO(mp))
  221. #endif
  222. #if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_CFORK_ASIZE)
  223. int xfs_cfork_asize_disk(xfs_dinode_core_t *dcp, struct xfs_mount *mp);
  224. int xfs_cfork_asize(xfs_dinode_core_t *dcp, struct xfs_mount *mp);
  225. #define XFS_CFORK_ASIZE_DISK(dcp,mp) xfs_cfork_asize_disk(dcp,mp)
  226. #define XFS_CFORK_ASIZE(dcp,mp) xfs_cfork_asize(dcp,mp)
  227. #else
  228. #define XFS_CFORK_ASIZE_DISK(dcp,mp) \
  229. (XFS_CFORK_Q_DISK(dcp) ? XFS_LITINO(mp) - XFS_CFORK_BOFF_DISK(dcp) : 0)
  230. #define XFS_CFORK_ASIZE(dcp,mp) \
  231. (XFS_CFORK_Q(dcp) ? XFS_LITINO(mp) - XFS_CFORK_BOFF(dcp) : 0)
  232. #endif
  233. #if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_CFORK_SIZE)
  234. int xfs_cfork_size_disk(xfs_dinode_core_t *dcp, struct xfs_mount *mp, int w);
  235. int xfs_cfork_size(xfs_dinode_core_t *dcp, struct xfs_mount *mp, int w);
  236. #define XFS_CFORK_SIZE_DISK(dcp,mp,w) xfs_cfork_size_disk(dcp,mp,w)
  237. #define XFS_CFORK_SIZE(dcp,mp,w) xfs_cfork_size(dcp,mp,w)
  238. #else
  239. #define XFS_CFORK_SIZE_DISK(dcp,mp,w) \
  240. ((w) == XFS_DATA_FORK ? \
  241. XFS_CFORK_DSIZE_DISK(dcp, mp) : \
  242. XFS_CFORK_ASIZE_DISK(dcp, mp))
  243. #define XFS_CFORK_SIZE(dcp,mp,w) \
  244. ((w) == XFS_DATA_FORK ? \
  245. XFS_CFORK_DSIZE(dcp, mp) : XFS_CFORK_ASIZE(dcp, mp))
  246. #endif
  247. #if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DFORK_DSIZE)
  248. int xfs_dfork_dsize(xfs_dinode_t *dip, struct xfs_mount *mp);
  249. #define XFS_DFORK_DSIZE(dip,mp) xfs_dfork_dsize(dip,mp)
  250. #else
  251. #define XFS_DFORK_DSIZE(dip,mp) XFS_CFORK_DSIZE_DISK(&(dip)->di_core, mp)
  252. #endif
  253. #if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DFORK_ASIZE)
  254. int xfs_dfork_asize(xfs_dinode_t *dip, struct xfs_mount *mp);
  255. #define XFS_DFORK_ASIZE(dip,mp) xfs_dfork_asize(dip,mp)
  256. #else
  257. #define XFS_DFORK_ASIZE(dip,mp) XFS_CFORK_ASIZE_DISK(&(dip)->di_core, mp)
  258. #endif
  259. #if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DFORK_SIZE)
  260. int xfs_dfork_size(xfs_dinode_t *dip, struct xfs_mount *mp, int w);
  261. #define XFS_DFORK_SIZE(dip,mp,w) xfs_dfork_size(dip,mp,w)
  262. #else
  263. #define XFS_DFORK_SIZE(dip,mp,w) XFS_CFORK_SIZE_DISK(&(dip)->di_core, mp, w)
  264. #endif
  265. /*
  266. * Macros for accessing per-fork disk inode information.
  267. */
  268. #if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DFORK_Q)
  269. int xfs_dfork_q(xfs_dinode_t *dip);
  270. #define XFS_DFORK_Q(dip) xfs_dfork_q(dip)
  271. #else
  272. #define XFS_DFORK_Q(dip) XFS_CFORK_Q_DISK(&(dip)->di_core)
  273. #endif
  274. #if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DFORK_BOFF)
  275. int xfs_dfork_boff(xfs_dinode_t *dip);
  276. #define XFS_DFORK_BOFF(dip) xfs_dfork_boff(dip)
  277. #else
  278. #define XFS_DFORK_BOFF(dip) XFS_CFORK_BOFF_DISK(&(dip)->di_core)
  279. #endif
  280. #if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DFORK_DPTR)
  281. char *xfs_dfork_dptr(xfs_dinode_t *dip);
  282. #define XFS_DFORK_DPTR(dip) xfs_dfork_dptr(dip)
  283. #else
  284. #define XFS_DFORK_DPTR(dip) ((dip)->di_u.di_c)
  285. #endif
  286. #if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DFORK_APTR)
  287. char *xfs_dfork_aptr(xfs_dinode_t *dip);
  288. #define XFS_DFORK_APTR(dip) xfs_dfork_aptr(dip)
  289. #else
  290. #define XFS_DFORK_APTR(dip) ((dip)->di_u.di_c + XFS_DFORK_BOFF(dip))
  291. #endif
  292. #if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DFORK_PTR)
  293. char *xfs_dfork_ptr(xfs_dinode_t *dip, int w);
  294. #define XFS_DFORK_PTR(dip,w) xfs_dfork_ptr(dip,w)
  295. #else
  296. #define XFS_DFORK_PTR(dip,w) \
  297. ((w) == XFS_DATA_FORK ? XFS_DFORK_DPTR(dip) : XFS_DFORK_APTR(dip))
  298. #endif
  299. #if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_CFORK_FORMAT)
  300. int xfs_cfork_format(xfs_dinode_core_t *dcp, int w);
  301. #define XFS_CFORK_FORMAT(dcp,w) xfs_cfork_format(dcp,w)
  302. #else
  303. #define XFS_CFORK_FORMAT(dcp,w) \
  304. ((w) == XFS_DATA_FORK ? (dcp)->di_format : (dcp)->di_aformat)
  305. #endif
  306. #if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_CFORK_FMT_SET)
  307. void xfs_cfork_fmt_set(xfs_dinode_core_t *dcp, int w, int n);
  308. #define XFS_CFORK_FMT_SET(dcp,w,n) xfs_cfork_fmt_set(dcp,w,n)
  309. #else
  310. #define XFS_CFORK_FMT_SET(dcp,w,n) \
  311. ((w) == XFS_DATA_FORK ? \
  312. ((dcp)->di_format = (n)) : \
  313. ((dcp)->di_aformat = (n)))
  314. #endif
  315. #if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_CFORK_NEXTENTS)
  316. int xfs_cfork_nextents_disk(xfs_dinode_core_t *dcp, int w);
  317. int xfs_cfork_nextents(xfs_dinode_core_t *dcp, int w);
  318. #define XFS_CFORK_NEXTENTS_DISK(dcp,w) xfs_cfork_nextents_disk(dcp,w)
  319. #define XFS_CFORK_NEXTENTS(dcp,w) xfs_cfork_nextents(dcp,w)
  320. #else
  321. #define XFS_CFORK_NEXTENTS_DISK(dcp,w) \
  322. ((w) == XFS_DATA_FORK ? \
  323. INT_GET((dcp)->di_nextents, ARCH_CONVERT) : \
  324. INT_GET((dcp)->di_anextents, ARCH_CONVERT))
  325. #define XFS_CFORK_NEXTENTS(dcp,w) \
  326. ((w) == XFS_DATA_FORK ? (dcp)->di_nextents : (dcp)->di_anextents)
  327. #endif
  328. #if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_CFORK_NEXT_SET)
  329. void xfs_cfork_next_set(xfs_dinode_core_t *dcp, int w, int n);
  330. #define XFS_CFORK_NEXT_SET(dcp,w,n) xfs_cfork_next_set(dcp,w,n)
  331. #else
  332. #define XFS_CFORK_NEXT_SET(dcp,w,n) \
  333. ((w) == XFS_DATA_FORK ? \
  334. ((dcp)->di_nextents = (n)) : \
  335. ((dcp)->di_anextents = (n)))
  336. #endif
  337. #if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DFORK_NEXTENTS)
  338. int xfs_dfork_nextents(xfs_dinode_t *dip, int w);
  339. #define XFS_DFORK_NEXTENTS(dip,w) xfs_dfork_nextents(dip,w)
  340. #else
  341. #define XFS_DFORK_NEXTENTS(dip,w) XFS_CFORK_NEXTENTS_DISK(&(dip)->di_core, w)
  342. #endif
  343. #if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_BUF_TO_DINODE)
  344. xfs_dinode_t *xfs_buf_to_dinode(struct xfs_buf *bp);
  345. #define XFS_BUF_TO_DINODE(bp) xfs_buf_to_dinode(bp)
  346. #else
  347. #define XFS_BUF_TO_DINODE(bp) ((xfs_dinode_t *)(XFS_BUF_PTR(bp)))
  348. #endif
  349. /*
  350. * Values for di_flags
  351. * There should be a one-to-one correspondence between these flags and the
  352. * XFS_XFLAG_s.
  353. */
  354. #define XFS_DIFLAG_REALTIME_BIT 0 /* file's blocks come from rt area */
  355. #define XFS_DIFLAG_PREALLOC_BIT 1 /* file space has been preallocated */
  356. #define XFS_DIFLAG_NEWRTBM_BIT 2 /* for rtbitmap inode, new format */
  357. #define XFS_DIFLAG_IMMUTABLE_BIT 3 /* inode is immutable */
  358. #define XFS_DIFLAG_APPEND_BIT 4 /* inode is append-only */
  359. #define XFS_DIFLAG_SYNC_BIT 5 /* inode is written synchronously */
  360. #define XFS_DIFLAG_NOATIME_BIT 6 /* do not update atime */
  361. #define XFS_DIFLAG_NODUMP_BIT 7 /* do not dump */
  362. #define XFS_DIFLAG_RTINHERIT_BIT 8 /* create with realtime bit set */
  363. #define XFS_DIFLAG_PROJINHERIT_BIT 9 /* create with parents projid */
  364. #define XFS_DIFLAG_NOSYMLINKS_BIT 10 /* disallow symlink creation */
  365. #define XFS_DIFLAG_REALTIME (1 << XFS_DIFLAG_REALTIME_BIT)
  366. #define XFS_DIFLAG_PREALLOC (1 << XFS_DIFLAG_PREALLOC_BIT)
  367. #define XFS_DIFLAG_NEWRTBM (1 << XFS_DIFLAG_NEWRTBM_BIT)
  368. #define XFS_DIFLAG_IMMUTABLE (1 << XFS_DIFLAG_IMMUTABLE_BIT)
  369. #define XFS_DIFLAG_APPEND (1 << XFS_DIFLAG_APPEND_BIT)
  370. #define XFS_DIFLAG_SYNC (1 << XFS_DIFLAG_SYNC_BIT)
  371. #define XFS_DIFLAG_NOATIME (1 << XFS_DIFLAG_NOATIME_BIT)
  372. #define XFS_DIFLAG_NODUMP (1 << XFS_DIFLAG_NODUMP_BIT)
  373. #define XFS_DIFLAG_RTINHERIT (1 << XFS_DIFLAG_RTINHERIT_BIT)
  374. #define XFS_DIFLAG_PROJINHERIT (1 << XFS_DIFLAG_PROJINHERIT_BIT)
  375. #define XFS_DIFLAG_NOSYMLINKS (1 << XFS_DIFLAG_NOSYMLINKS_BIT)
  376. #define XFS_DIFLAG_ANY \
  377. (XFS_DIFLAG_REALTIME | XFS_DIFLAG_PREALLOC | XFS_DIFLAG_NEWRTBM | \
  378. XFS_DIFLAG_IMMUTABLE | XFS_DIFLAG_APPEND | XFS_DIFLAG_SYNC | \
  379. XFS_DIFLAG_NOATIME | XFS_DIFLAG_NODUMP | XFS_DIFLAG_RTINHERIT | \
  380. XFS_DIFLAG_PROJINHERIT | XFS_DIFLAG_NOSYMLINKS)
  381. #endif /* __XFS_DINODE_H__ */