aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_inode.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2008-11-27 22:23:41 -0500
committerNiv Sardi <xaiki@sgi.com>2008-11-30 19:38:08 -0500
commit92bfc6e7c4eabbbd15e7d6d49123b296d05dcfd1 (patch)
tree4b409ecbc4b0704189b05989fae0a423bb557efd /fs/xfs/xfs_inode.h
parent94e1b69d1abd108d306e926c3012ec89e481c0da (diff)
[XFS] embededd struct xfs_imap into xfs_inode
Most uses of struct xfs_imap are to map and inode to a buffer. To avoid copying around the inode location information we should just embedd a strcut xfs_imap into the xfs_inode. To make sure it doesn't bloat an inode the im_len is changed to a ushort, which is fine as that's what the users exepect anyway. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <david@fromorbit.com> Signed-off-by: Niv Sardi <xaiki@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_inode.h')
-rw-r--r--fs/xfs/xfs_inode.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/fs/xfs/xfs_inode.h b/fs/xfs/xfs_inode.h
index 0a9ad1c56a87..d5c3aa1b18ef 100644
--- a/fs/xfs/xfs_inode.h
+++ b/fs/xfs/xfs_inode.h
@@ -83,6 +83,16 @@ typedef struct xfs_ifork {
83} xfs_ifork_t; 83} xfs_ifork_t;
84 84
85/* 85/*
86 * Inode location information. Stored in the inode and passed to
87 * xfs_imap_to_bp() to get a buffer and dinode for a given inode.
88 */
89struct xfs_imap {
90 xfs_daddr_t im_blkno; /* starting BB of inode chunk */
91 ushort im_len; /* length in BBs of inode chunk */
92 ushort im_boffset; /* inode offset in block in bytes */
93};
94
95/*
86 * This is the xfs in-core inode structure. 96 * This is the xfs in-core inode structure.
87 * Most of the on-disk inode is embedded in the i_d field. 97 * Most of the on-disk inode is embedded in the i_d field.
88 * 98 *
@@ -238,9 +248,7 @@ typedef struct xfs_inode {
238 248
239 /* Inode location stuff */ 249 /* Inode location stuff */
240 xfs_ino_t i_ino; /* inode number (agno/agino)*/ 250 xfs_ino_t i_ino; /* inode number (agno/agino)*/
241 xfs_daddr_t i_blkno; /* blkno of inode buffer */ 251 struct xfs_imap i_imap; /* location for xfs_imap() */
242 ushort i_len; /* len of inode buffer */
243 ushort i_boffset; /* off of inode in buffer */
244 252
245 /* Extent information. */ 253 /* Extent information. */
246 xfs_ifork_t *i_afp; /* attribute fork pointer */ 254 xfs_ifork_t *i_afp; /* attribute fork pointer */