diff options
Diffstat (limited to 'fs/xfs/xfs_inode.h')
-rw-r--r-- | fs/xfs/xfs_inode.h | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/fs/xfs/xfs_inode.h b/fs/xfs/xfs_inode.h index 0898c5417d12..fac52290de90 100644 --- a/fs/xfs/xfs_inode.h +++ b/fs/xfs/xfs_inode.h | |||
@@ -134,8 +134,9 @@ typedef struct xfs_icdinode { | |||
134 | __uint32_t di_uid; /* owner's user id */ | 134 | __uint32_t di_uid; /* owner's user id */ |
135 | __uint32_t di_gid; /* owner's group id */ | 135 | __uint32_t di_gid; /* owner's group id */ |
136 | __uint32_t di_nlink; /* number of links to file */ | 136 | __uint32_t di_nlink; /* number of links to file */ |
137 | __uint16_t di_projid; /* owner's project id */ | 137 | __uint16_t di_projid_lo; /* lower part of owner's project id */ |
138 | __uint8_t di_pad[8]; /* unused, zeroed space */ | 138 | __uint16_t di_projid_hi; /* higher part of owner's project id */ |
139 | __uint8_t di_pad[6]; /* unused, zeroed space */ | ||
139 | __uint16_t di_flushiter; /* incremented on flush */ | 140 | __uint16_t di_flushiter; /* incremented on flush */ |
140 | xfs_ictimestamp_t di_atime; /* time last accessed */ | 141 | xfs_ictimestamp_t di_atime; /* time last accessed */ |
141 | xfs_ictimestamp_t di_mtime; /* time last modified */ | 142 | xfs_ictimestamp_t di_mtime; /* time last modified */ |
@@ -212,7 +213,6 @@ typedef struct xfs_icdinode { | |||
212 | #ifdef __KERNEL__ | 213 | #ifdef __KERNEL__ |
213 | 214 | ||
214 | struct bhv_desc; | 215 | struct bhv_desc; |
215 | struct cred; | ||
216 | struct xfs_buf; | 216 | struct xfs_buf; |
217 | struct xfs_bmap_free; | 217 | struct xfs_bmap_free; |
218 | struct xfs_bmbt_irec; | 218 | struct xfs_bmbt_irec; |
@@ -335,6 +335,25 @@ xfs_iflags_test_and_clear(xfs_inode_t *ip, unsigned short flags) | |||
335 | } | 335 | } |
336 | 336 | ||
337 | /* | 337 | /* |
338 | * Project quota id helpers (previously projid was 16bit only | ||
339 | * and using two 16bit values to hold new 32bit projid was choosen | ||
340 | * to retain compatibility with "old" filesystems). | ||
341 | */ | ||
342 | static inline prid_t | ||
343 | xfs_get_projid(struct xfs_inode *ip) | ||
344 | { | ||
345 | return (prid_t)ip->i_d.di_projid_hi << 16 | ip->i_d.di_projid_lo; | ||
346 | } | ||
347 | |||
348 | static inline void | ||
349 | xfs_set_projid(struct xfs_inode *ip, | ||
350 | prid_t projid) | ||
351 | { | ||
352 | ip->i_d.di_projid_hi = (__uint16_t) (projid >> 16); | ||
353 | ip->i_d.di_projid_lo = (__uint16_t) (projid & 0xffff); | ||
354 | } | ||
355 | |||
356 | /* | ||
338 | * Manage the i_flush queue embedded in the inode. This completion | 357 | * Manage the i_flush queue embedded in the inode. This completion |
339 | * queue synchronizes processes attempting to flush the in-core | 358 | * queue synchronizes processes attempting to flush the in-core |
340 | * inode back to disk. | 359 | * inode back to disk. |
@@ -456,8 +475,8 @@ void xfs_inode_free(struct xfs_inode *ip); | |||
456 | * xfs_inode.c prototypes. | 475 | * xfs_inode.c prototypes. |
457 | */ | 476 | */ |
458 | int xfs_ialloc(struct xfs_trans *, xfs_inode_t *, mode_t, | 477 | int xfs_ialloc(struct xfs_trans *, xfs_inode_t *, mode_t, |
459 | xfs_nlink_t, xfs_dev_t, cred_t *, xfs_prid_t, | 478 | xfs_nlink_t, xfs_dev_t, prid_t, int, |
460 | int, struct xfs_buf **, boolean_t *, xfs_inode_t **); | 479 | struct xfs_buf **, boolean_t *, xfs_inode_t **); |
461 | 480 | ||
462 | uint xfs_ip2xflags(struct xfs_inode *); | 481 | uint xfs_ip2xflags(struct xfs_inode *); |
463 | uint xfs_dic2xflags(struct xfs_dinode *); | 482 | uint xfs_dic2xflags(struct xfs_dinode *); |
@@ -471,7 +490,6 @@ int xfs_iunlink(struct xfs_trans *, xfs_inode_t *); | |||
471 | void xfs_iext_realloc(xfs_inode_t *, int, int); | 490 | void xfs_iext_realloc(xfs_inode_t *, int, int); |
472 | void xfs_iunpin_wait(xfs_inode_t *); | 491 | void xfs_iunpin_wait(xfs_inode_t *); |
473 | int xfs_iflush(xfs_inode_t *, uint); | 492 | int xfs_iflush(xfs_inode_t *, uint); |
474 | void xfs_ichgtime(xfs_inode_t *, int); | ||
475 | void xfs_lock_inodes(xfs_inode_t **, int, uint); | 493 | void xfs_lock_inodes(xfs_inode_t **, int, uint); |
476 | void xfs_lock_two_inodes(xfs_inode_t *, xfs_inode_t *, uint); | 494 | void xfs_lock_two_inodes(xfs_inode_t *, xfs_inode_t *, uint); |
477 | 495 | ||