aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_ialloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_ialloc.c')
-rw-r--r--fs/xfs/xfs_ialloc.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/fs/xfs/xfs_ialloc.c b/fs/xfs/xfs_ialloc.c
index f13f59b13cc8..c8a56c529642 100644
--- a/fs/xfs/xfs_ialloc.c
+++ b/fs/xfs/xfs_ialloc.c
@@ -192,6 +192,29 @@ xfs_inobt_update(
192} 192}
193 193
194/* 194/*
195 * Get the data from the pointed-to record.
196 */
197int /* error */
198xfs_inobt_get_rec(
199 struct xfs_btree_cur *cur, /* btree cursor */
200 xfs_agino_t *ino, /* output: starting inode of chunk */
201 __int32_t *fcnt, /* output: number of free inodes */
202 xfs_inofree_t *free, /* output: free inode mask */
203 int *stat) /* output: success/failure */
204{
205 union xfs_btree_rec *rec;
206 int error;
207
208 error = xfs_btree_get_rec(cur, &rec, stat);
209 if (!error && *stat == 1) {
210 *ino = be32_to_cpu(rec->inobt.ir_startino);
211 *fcnt = be32_to_cpu(rec->inobt.ir_freecount);
212 *free = be64_to_cpu(rec->inobt.ir_free);
213 }
214 return error;
215}
216
217/*
195 * Allocate new inodes in the allocation group specified by agbp. 218 * Allocate new inodes in the allocation group specified by agbp.
196 * Return 0 for success, else error code. 219 * Return 0 for success, else error code.
197 */ 220 */