]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs: helper to convert holemask to inode alloc. bitmap
authorBrian Foster <bfoster@redhat.com>
Thu, 28 May 2015 23:09:05 +0000 (09:09 +1000)
committerDave Chinner <david@fromorbit.com>
Tue, 23 Jun 2015 05:07:45 +0000 (15:07 +1000)
commit8dff44ecc9a00a7cc0a36a599006e283f2fc4c87
treed3daa4d1c1dcc73dc63e36f4c7077b64b780b07e
parentb291dee0a29a6515f4518fbe9c44beb25f8a93b6
xfs: helper to convert holemask to inode alloc. bitmap

The inobt record holemask field is a condensed data type designed to fit
into the existing on-disk record and is zero based (allocated regions
are set to 0, sparse regions are set to 1) to provide backwards
compatibility. This makes the type somewhat complex for use in higher
level inode manipulations such as individual inode allocation, etc.

Rather than foist the complexity of dealing with this field to every bit
of logic that requires inode granular information, create a helper to
convert the holemask to an inode allocation bitmap. The inode allocation
bitmap is inode granularity similar to the inobt record free mask and
indicates which inodes of the chunk are physically allocated on disk,
irrespective of whether the inode is considered allocated or free by the
filesystem.

Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
libxfs/xfs_ialloc_btree.c
libxfs/xfs_ialloc_btree.h