diff options
Diffstat (limited to 'fs/xfs/xfs_inode.h')
-rw-r--r-- | fs/xfs/xfs_inode.h | 52 |
1 files changed, 48 insertions, 4 deletions
diff --git a/fs/xfs/xfs_inode.h b/fs/xfs/xfs_inode.h index 6fae71b42922..873b9f783d29 100644 --- a/fs/xfs/xfs_inode.h +++ b/fs/xfs/xfs_inode.h | |||
@@ -18,6 +18,10 @@ | |||
18 | #ifndef __XFS_INODE_H__ | 18 | #ifndef __XFS_INODE_H__ |
19 | #define __XFS_INODE_H__ | 19 | #define __XFS_INODE_H__ |
20 | 20 | ||
21 | struct xfs_dinode; | ||
22 | struct xfs_dinode_core; | ||
23 | |||
24 | |||
21 | /* | 25 | /* |
22 | * Fork identifiers. | 26 | * Fork identifiers. |
23 | */ | 27 | */ |
@@ -227,6 +231,43 @@ typedef struct xfs_chash { | |||
227 | * chain off the mount structure by xfs_sync calls. | 231 | * chain off the mount structure by xfs_sync calls. |
228 | */ | 232 | */ |
229 | 233 | ||
234 | typedef struct xfs_ictimestamp { | ||
235 | __int32_t t_sec; /* timestamp seconds */ | ||
236 | __int32_t t_nsec; /* timestamp nanoseconds */ | ||
237 | } xfs_ictimestamp_t; | ||
238 | |||
239 | /* | ||
240 | * NOTE: This structure must be kept identical to struct xfs_dinode_core | ||
241 | * in xfs_dinode.h except for the endianess annotations. | ||
242 | */ | ||
243 | typedef struct xfs_icdinode { | ||
244 | __uint16_t di_magic; /* inode magic # = XFS_DINODE_MAGIC */ | ||
245 | __uint16_t di_mode; /* mode and type of file */ | ||
246 | __int8_t di_version; /* inode version */ | ||
247 | __int8_t di_format; /* format of di_c data */ | ||
248 | __uint16_t di_onlink; /* old number of links to file */ | ||
249 | __uint32_t di_uid; /* owner's user id */ | ||
250 | __uint32_t di_gid; /* owner's group id */ | ||
251 | __uint32_t di_nlink; /* number of links to file */ | ||
252 | __uint16_t di_projid; /* owner's project id */ | ||
253 | __uint8_t di_pad[8]; /* unused, zeroed space */ | ||
254 | __uint16_t di_flushiter; /* incremented on flush */ | ||
255 | xfs_ictimestamp_t di_atime; /* time last accessed */ | ||
256 | xfs_ictimestamp_t di_mtime; /* time last modified */ | ||
257 | xfs_ictimestamp_t di_ctime; /* time created/inode modified */ | ||
258 | xfs_fsize_t di_size; /* number of bytes in file */ | ||
259 | xfs_drfsbno_t di_nblocks; /* # of direct & btree blocks used */ | ||
260 | xfs_extlen_t di_extsize; /* basic/minimum extent size for file */ | ||
261 | xfs_extnum_t di_nextents; /* number of extents in data fork */ | ||
262 | xfs_aextnum_t di_anextents; /* number of extents in attribute fork*/ | ||
263 | __uint8_t di_forkoff; /* attr fork offs, <<3 for 64b align */ | ||
264 | __int8_t di_aformat; /* format of attr fork's data */ | ||
265 | __uint32_t di_dmevmask; /* DMIG event mask */ | ||
266 | __uint16_t di_dmstate; /* DMIG state info */ | ||
267 | __uint16_t di_flags; /* random flags, XFS_DIFLAG_... */ | ||
268 | __uint32_t di_gen; /* generation number */ | ||
269 | } xfs_icdinode_t; | ||
270 | |||
230 | typedef struct { | 271 | typedef struct { |
231 | struct xfs_ihash *ip_hash; /* pointer to hash header */ | 272 | struct xfs_ihash *ip_hash; /* pointer to hash header */ |
232 | struct xfs_inode *ip_next; /* inode hash link forw */ | 273 | struct xfs_inode *ip_next; /* inode hash link forw */ |
@@ -282,7 +323,7 @@ typedef struct xfs_inode { | |||
282 | unsigned int i_gen; /* generation count */ | 323 | unsigned int i_gen; /* generation count */ |
283 | unsigned int i_delayed_blks; /* count of delay alloc blks */ | 324 | unsigned int i_delayed_blks; /* count of delay alloc blks */ |
284 | 325 | ||
285 | xfs_dinode_core_t i_d; /* most of ondisk inode */ | 326 | xfs_icdinode_t i_d; /* most of ondisk inode */ |
286 | xfs_chashlist_t *i_chash; /* cluster hash list header */ | 327 | xfs_chashlist_t *i_chash; /* cluster hash list header */ |
287 | struct xfs_inode *i_cnext; /* cluster hash link forward */ | 328 | struct xfs_inode *i_cnext; /* cluster hash link forward */ |
288 | struct xfs_inode *i_cprev; /* cluster hash link backward */ | 329 | struct xfs_inode *i_cprev; /* cluster hash link backward */ |
@@ -506,7 +547,7 @@ int xfs_finish_reclaim_all(struct xfs_mount *, int); | |||
506 | * xfs_inode.c prototypes. | 547 | * xfs_inode.c prototypes. |
507 | */ | 548 | */ |
508 | int xfs_itobp(struct xfs_mount *, struct xfs_trans *, | 549 | int xfs_itobp(struct xfs_mount *, struct xfs_trans *, |
509 | xfs_inode_t *, xfs_dinode_t **, struct xfs_buf **, | 550 | xfs_inode_t *, struct xfs_dinode **, struct xfs_buf **, |
510 | xfs_daddr_t, uint); | 551 | xfs_daddr_t, uint); |
511 | int xfs_iread(struct xfs_mount *, struct xfs_trans *, xfs_ino_t, | 552 | int xfs_iread(struct xfs_mount *, struct xfs_trans *, xfs_ino_t, |
512 | xfs_inode_t **, xfs_daddr_t, uint); | 553 | xfs_inode_t **, xfs_daddr_t, uint); |
@@ -514,8 +555,11 @@ int xfs_iread_extents(struct xfs_trans *, xfs_inode_t *, int); | |||
514 | int xfs_ialloc(struct xfs_trans *, xfs_inode_t *, mode_t, | 555 | int xfs_ialloc(struct xfs_trans *, xfs_inode_t *, mode_t, |
515 | xfs_nlink_t, xfs_dev_t, struct cred *, xfs_prid_t, | 556 | xfs_nlink_t, xfs_dev_t, struct cred *, xfs_prid_t, |
516 | int, struct xfs_buf **, boolean_t *, xfs_inode_t **); | 557 | int, struct xfs_buf **, boolean_t *, xfs_inode_t **); |
517 | void xfs_xlate_dinode_core(xfs_caddr_t, struct xfs_dinode_core *, | 558 | void xfs_dinode_from_disk(struct xfs_icdinode *, |
518 | int); | 559 | struct xfs_dinode_core *); |
560 | void xfs_dinode_to_disk(struct xfs_dinode_core *, | ||
561 | struct xfs_icdinode *); | ||
562 | |||
519 | uint xfs_ip2xflags(struct xfs_inode *); | 563 | uint xfs_ip2xflags(struct xfs_inode *); |
520 | uint xfs_dic2xflags(struct xfs_dinode_core *); | 564 | uint xfs_dic2xflags(struct xfs_dinode_core *); |
521 | int xfs_ifree(struct xfs_trans *, xfs_inode_t *, | 565 | int xfs_ifree(struct xfs_trans *, xfs_inode_t *, |