xfs: insert newly allocated inode chunks into the finobt
authorBrian Foster <bfoster@redhat.com>
Thu, 24 Apr 2014 06:00:53 +0000 (16:00 +1000)
committerDave Chinner <david@fromorbit.com>
Thu, 24 Apr 2014 06:00:53 +0000 (16:00 +1000)
commit0aa0a756ec255cfc8b733fe0d8993c1758b1240c
treec9d25258ab96046dd3e594cb4d6ded335878c2da
parent9d43b180af67cccd4bd1342f7f54f8131515b0a1
xfs: insert newly allocated inode chunks into the finobt

A newly allocated inode chunk, by definition, has at least one
free inode, so a record is always inserted into the finobt.

Create the xfs_inobt_insert() helper from existing code to insert
a record in an inobt based on the provided BTNUM. Update
xfs_ialloc_ag_alloc() to invoke the helper for the existing
XFS_BTNUM_INO tree and XFS_BTNUM_FINO tree, if enabled.

Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
fs/xfs/xfs_ialloc.c