[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>
This commit is contained in:
committed by
Niv Sardi
parent
94e1b69d1a
commit
92bfc6e7c4
@ -82,6 +82,16 @@ typedef struct xfs_ifork {
|
||||
} if_u2;
|
||||
} xfs_ifork_t;
|
||||
|
||||
/*
|
||||
* Inode location information. Stored in the inode and passed to
|
||||
* xfs_imap_to_bp() to get a buffer and dinode for a given inode.
|
||||
*/
|
||||
struct xfs_imap {
|
||||
xfs_daddr_t im_blkno; /* starting BB of inode chunk */
|
||||
ushort im_len; /* length in BBs of inode chunk */
|
||||
ushort im_boffset; /* inode offset in block in bytes */
|
||||
};
|
||||
|
||||
/*
|
||||
* This is the xfs in-core inode structure.
|
||||
* Most of the on-disk inode is embedded in the i_d field.
|
||||
@ -238,9 +248,7 @@ typedef struct xfs_inode {
|
||||
|
||||
/* Inode location stuff */
|
||||
xfs_ino_t i_ino; /* inode number (agno/agino)*/
|
||||
xfs_daddr_t i_blkno; /* blkno of inode buffer */
|
||||
ushort i_len; /* len of inode buffer */
|
||||
ushort i_boffset; /* off of inode in buffer */
|
||||
struct xfs_imap i_imap; /* location for xfs_imap() */
|
||||
|
||||
/* Extent information. */
|
||||
xfs_ifork_t *i_afp; /* attribute fork pointer */
|
||||
|
Reference in New Issue
Block a user