diff options
author | Dave Chinner <dchinner@redhat.com> | 2013-08-12 06:49:35 -0400 |
---|---|---|
committer | Ben Myers <bpm@sgi.com> | 2013-08-12 17:39:05 -0400 |
commit | 1fd7115eda5661e872463694fc4a12821c4f914a (patch) | |
tree | 147f8c4d1f4fac5c7f876e96ae4a4c8d201972f4 /fs/xfs/xfs_inode.h | |
parent | 7bb85ef3608bf740e285b4436776526b7afd4903 (diff) |
xfs: introduce xfs_inode_buf.c for inode buffer operations
The only thing remaining in xfs_inode.[ch] are the operations that
read, write or verify physical inodes in their underlying buffers.
Move all this code to xfs_inode_buf.[ch] and so we can stop sharing
xfs_inode.[ch] with userspace.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_inode.h')
-rw-r--r-- | fs/xfs/xfs_inode.h | 41 |
1 files changed, 7 insertions, 34 deletions
diff --git a/fs/xfs/xfs_inode.h b/fs/xfs/xfs_inode.h index 0bd034ac8f82..8f775ed722a9 100644 --- a/fs/xfs/xfs_inode.h +++ b/fs/xfs/xfs_inode.h | |||
@@ -18,24 +18,15 @@ | |||
18 | #ifndef __XFS_INODE_H__ | 18 | #ifndef __XFS_INODE_H__ |
19 | #define __XFS_INODE_H__ | 19 | #define __XFS_INODE_H__ |
20 | 20 | ||
21 | struct posix_acl; | 21 | #include "xfs_inode_buf.h" |
22 | struct xfs_dinode; | ||
23 | struct xfs_inode; | ||
24 | |||
25 | #include "xfs_inode_fork.h" | 22 | #include "xfs_inode_fork.h" |
26 | 23 | ||
27 | /* | 24 | /* |
28 | * Inode location information. Stored in the inode and passed to | 25 | * Kernel only inode definitions |
29 | * xfs_imap_to_bp() to get a buffer and dinode for a given inode. | ||
30 | */ | 26 | */ |
31 | struct xfs_imap { | ||
32 | xfs_daddr_t im_blkno; /* starting BB of inode chunk */ | ||
33 | ushort im_len; /* length in BBs of inode chunk */ | ||
34 | ushort im_boffset; /* inode offset in block in bytes */ | ||
35 | }; | ||
36 | |||
37 | #ifdef __KERNEL__ | ||
38 | 27 | ||
28 | struct xfs_dinode; | ||
29 | struct xfs_inode; | ||
39 | struct xfs_buf; | 30 | struct xfs_buf; |
40 | struct xfs_bmap_free; | 31 | struct xfs_bmap_free; |
41 | struct xfs_bmbt_irec; | 32 | struct xfs_bmbt_irec; |
@@ -347,7 +338,10 @@ int xfs_itruncate_extents(struct xfs_trans **, struct xfs_inode *, | |||
347 | int xfs_iunlink(struct xfs_trans *, xfs_inode_t *); | 338 | int xfs_iunlink(struct xfs_trans *, xfs_inode_t *); |
348 | 339 | ||
349 | void xfs_iext_realloc(xfs_inode_t *, int, int); | 340 | void xfs_iext_realloc(xfs_inode_t *, int, int); |
341 | |||
350 | void xfs_iunpin_wait(xfs_inode_t *); | 342 | void xfs_iunpin_wait(xfs_inode_t *); |
343 | #define xfs_ipincount(ip) ((unsigned int) atomic_read(&ip->i_pincount)) | ||
344 | |||
351 | int xfs_iflush(struct xfs_inode *, struct xfs_buf **); | 345 | int xfs_iflush(struct xfs_inode *, struct xfs_buf **); |
352 | void xfs_lock_inodes(xfs_inode_t **, int, uint); | 346 | void xfs_lock_inodes(xfs_inode_t **, int, uint); |
353 | void xfs_lock_two_inodes(xfs_inode_t *, xfs_inode_t *, uint); | 347 | void xfs_lock_two_inodes(xfs_inode_t *, xfs_inode_t *, uint); |
@@ -367,27 +361,6 @@ do { \ | |||
367 | iput(VFS_I(ip)); \ | 361 | iput(VFS_I(ip)); \ |
368 | } while (0) | 362 | } while (0) |
369 | 363 | ||
370 | #endif /* __KERNEL__ */ | ||
371 | |||
372 | int xfs_imap_to_bp(struct xfs_mount *, struct xfs_trans *, | ||
373 | struct xfs_imap *, struct xfs_dinode **, | ||
374 | struct xfs_buf **, uint, uint); | ||
375 | int xfs_iread(struct xfs_mount *, struct xfs_trans *, | ||
376 | struct xfs_inode *, uint); | ||
377 | void xfs_dinode_calc_crc(struct xfs_mount *, struct xfs_dinode *); | ||
378 | void xfs_dinode_to_disk(struct xfs_dinode *, | ||
379 | struct xfs_icdinode *); | ||
380 | bool xfs_can_free_eofblocks(struct xfs_inode *, bool); | ||
381 | |||
382 | #define xfs_ipincount(ip) ((unsigned int) atomic_read(&ip->i_pincount)) | ||
383 | |||
384 | #if defined(DEBUG) | ||
385 | void xfs_inobp_check(struct xfs_mount *, struct xfs_buf *); | ||
386 | #else | ||
387 | #define xfs_inobp_check(mp, bp) | ||
388 | #endif /* DEBUG */ | ||
389 | |||
390 | extern struct kmem_zone *xfs_inode_zone; | 364 | extern struct kmem_zone *xfs_inode_zone; |
391 | extern const struct xfs_buf_ops xfs_inode_buf_ops; | ||
392 | 365 | ||
393 | #endif /* __XFS_INODE_H__ */ | 366 | #endif /* __XFS_INODE_H__ */ |