diff options
author | Christoph Hellwig <hch@lst.de> | 2008-11-27 22:23:41 -0500 |
---|---|---|
committer | Niv Sardi <xaiki@sgi.com> | 2008-11-30 19:38:03 -0500 |
commit | 94e1b69d1abd108d306e926c3012ec89e481c0da (patch) | |
tree | d7fb02a0c855729831dcddbef6afcb518d3ed870 /fs/xfs/xfs_ialloc.h | |
parent | a1941895034cda2bffa23ba845607c82138ccf52 (diff) |
[XFS] merge xfs_imap into xfs_dilocate
xfs_imap is the only caller of xfs_dilocate and doesn't add any significant
value. Merge the two functions and document the various cases we have for
inode cluster lookup in the new xfs_imap.
Also remove the unused im_agblkno and im_ioffset fields from struct xfs_imap
while we're at it.
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_ialloc.h')
-rw-r--r-- | fs/xfs/xfs_ialloc.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/fs/xfs/xfs_ialloc.h b/fs/xfs/xfs_ialloc.h index ccf554a6e0a1..50f558a4e0a8 100644 --- a/fs/xfs/xfs_ialloc.h +++ b/fs/xfs/xfs_ialloc.h | |||
@@ -20,6 +20,7 @@ | |||
20 | 20 | ||
21 | struct xfs_buf; | 21 | struct xfs_buf; |
22 | struct xfs_dinode; | 22 | struct xfs_dinode; |
23 | struct xfs_imap; | ||
23 | struct xfs_mount; | 24 | struct xfs_mount; |
24 | struct xfs_trans; | 25 | struct xfs_trans; |
25 | 26 | ||
@@ -104,17 +105,14 @@ xfs_difree( | |||
104 | xfs_ino_t *first_ino); /* first inode in deleted cluster */ | 105 | xfs_ino_t *first_ino); /* first inode in deleted cluster */ |
105 | 106 | ||
106 | /* | 107 | /* |
107 | * Return the location of the inode in bno/len/off, | 108 | * Return the location of the inode in imap, for mapping it into a buffer. |
108 | * for mapping it into a buffer. | ||
109 | */ | 109 | */ |
110 | int | 110 | int |
111 | xfs_dilocate( | 111 | xfs_imap( |
112 | struct xfs_mount *mp, /* file system mount structure */ | 112 | struct xfs_mount *mp, /* file system mount structure */ |
113 | struct xfs_trans *tp, /* transaction pointer */ | 113 | struct xfs_trans *tp, /* transaction pointer */ |
114 | xfs_ino_t ino, /* inode to locate */ | 114 | xfs_ino_t ino, /* inode to locate */ |
115 | xfs_fsblock_t *bno, /* output: block containing inode */ | 115 | struct xfs_imap *imap, /* location map structure */ |
116 | int *len, /* output: num blocks in cluster*/ | ||
117 | int *off, /* output: index in block of inode */ | ||
118 | uint flags); /* flags for inode btree lookup */ | 116 | uint flags); /* flags for inode btree lookup */ |
119 | 117 | ||
120 | /* | 118 | /* |