aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_inode.h
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2013-08-12 06:49:35 -0400
committerBen Myers <bpm@sgi.com>2013-08-12 17:39:05 -0400
commit1fd7115eda5661e872463694fc4a12821c4f914a (patch)
tree147f8c4d1f4fac5c7f876e96ae4a4c8d201972f4 /fs/xfs/xfs_inode.h
parent7bb85ef3608bf740e285b4436776526b7afd4903 (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.h41
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
21struct posix_acl; 21#include "xfs_inode_buf.h"
22struct xfs_dinode;
23struct 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 */
31struct 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
28struct xfs_dinode;
29struct xfs_inode;
39struct xfs_buf; 30struct xfs_buf;
40struct xfs_bmap_free; 31struct xfs_bmap_free;
41struct xfs_bmbt_irec; 32struct xfs_bmbt_irec;
@@ -347,7 +338,10 @@ int xfs_itruncate_extents(struct xfs_trans **, struct xfs_inode *,
347int xfs_iunlink(struct xfs_trans *, xfs_inode_t *); 338int xfs_iunlink(struct xfs_trans *, xfs_inode_t *);
348 339
349void xfs_iext_realloc(xfs_inode_t *, int, int); 340void xfs_iext_realloc(xfs_inode_t *, int, int);
341
350void xfs_iunpin_wait(xfs_inode_t *); 342void xfs_iunpin_wait(xfs_inode_t *);
343#define xfs_ipincount(ip) ((unsigned int) atomic_read(&ip->i_pincount))
344
351int xfs_iflush(struct xfs_inode *, struct xfs_buf **); 345int xfs_iflush(struct xfs_inode *, struct xfs_buf **);
352void xfs_lock_inodes(xfs_inode_t **, int, uint); 346void xfs_lock_inodes(xfs_inode_t **, int, uint);
353void xfs_lock_two_inodes(xfs_inode_t *, xfs_inode_t *, uint); 347void 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
372int xfs_imap_to_bp(struct xfs_mount *, struct xfs_trans *,
373 struct xfs_imap *, struct xfs_dinode **,
374 struct xfs_buf **, uint, uint);
375int xfs_iread(struct xfs_mount *, struct xfs_trans *,
376 struct xfs_inode *, uint);
377void xfs_dinode_calc_crc(struct xfs_mount *, struct xfs_dinode *);
378void xfs_dinode_to_disk(struct xfs_dinode *,
379 struct xfs_icdinode *);
380bool 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)
385void xfs_inobp_check(struct xfs_mount *, struct xfs_buf *);
386#else
387#define xfs_inobp_check(mp, bp)
388#endif /* DEBUG */
389
390extern struct kmem_zone *xfs_inode_zone; 364extern struct kmem_zone *xfs_inode_zone;
391extern const struct xfs_buf_ops xfs_inode_buf_ops;
392 365
393#endif /* __XFS_INODE_H__ */ 366#endif /* __XFS_INODE_H__ */