]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs: check min blks for random debug mode sparse allocations
authorBrian Foster <bfoster@redhat.com>
Fri, 31 Jul 2015 01:12:44 +0000 (11:12 +1000)
committerDave Chinner <david@fromorbit.com>
Fri, 31 Jul 2015 01:12:44 +0000 (11:12 +1000)
commit0d995d036bd9da592f037bc414f2b99cb0164ec7
tree91d6f44de33ff7058bfc9700a4fe14b26ef16415
parentcbf3beaa6e6754815128003917e889cd848f65d2
xfs: check min blks for random debug mode sparse allocations

The inode allocator enables random sparse inode chunk allocations in
DEBUG mode to facilitate testing. Sparse inode allocations are not
always possible, however, depending on the fs geometry. For example,
there is no possibility for a sparse inode allocation on filesystems
where the block size is large enough to fit one or more inode chunks
within a single block.

Fix up the DEBUG mode sparse inode allocation logic to trigger random
sparse allocations only when the geometry of the fs allows it.

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.c