summaryrefslogtreecommitdiff
path: root/fs/xfs/libxfs/xfs_ialloc.h
diff options
context:
space:
mode:
authorBrian Foster <bfoster@redhat.com>2015-05-28 23:22:52 (GMT)
committerDave Chinner <david@fromorbit.com>2015-05-28 23:22:52 (GMT)
commit10ae3dc7f221f9080af5f7f5de54925d6bd248d7 (patch)
treea3d08d9671c1162aea252a7fd7ea0c40c2a55774 /fs/xfs/libxfs/xfs_ialloc.h
parent26dd5217dee0ecfb95f8015ed8e9deebf8257608 (diff)
downloadlinux-10ae3dc7f221f9080af5f7f5de54925d6bd248d7.tar.xz
xfs: only free allocated regions of inode chunks
An inode chunk is currently added to the transaction free list based on a simple fsb conversion and hardcoded chunk length. The nature of sparse chunks is such that the physical chunk of inodes on disk may consist of one or more discontiguous parts. Blocks that reside in the holes of the inode chunk are not inodes and could be allocated to any other use or not allocated at all. Refactor the existing xfs_bmap_add_free() call into the xfs_difree_inode_chunk() helper. The new helper uses the existing calculation if a chunk is not sparse. Otherwise, use the inobt record holemask to free the contiguous regions of the chunk. Signed-off-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/libxfs/xfs_ialloc.h')
0 files changed, 0 insertions, 0 deletions