]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs: check min blks for random debug mode sparse allocations libxfs-4.2-rc1-update
authorBrian Foster <bfoster@redhat.com>
Fri, 3 Jul 2015 01:54:41 +0000 (11:54 +1000)
committerDave Chinner <david@fromorbit.com>
Fri, 3 Jul 2015 01:54:41 +0000 (11:54 +1000)
commite736ab9b351ad3300dd223b6e4a4e3fdbf37afca
treec2e9da66602655cb5d97a796415f0184bf6e067c
parentb0e6012463a50a2ca840ade4b0cfb3702d99c23c
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