]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: enforce min_bytes parameter during extent allocation
authorChris Mason <chris.mason@fusionio.com>
Tue, 5 Mar 2013 16:11:26 +0000 (11:11 -0500)
committerChris Mason <chris.mason@fusionio.com>
Tue, 5 Mar 2013 16:30:16 +0000 (11:30 -0500)
commit105dbd8ab46f56da11e4a1111f602259ad04b614
tree5a74f2ccc965aef784891a29d1ded2b8610257a7
parent25d082565907d168ffa56ef79f72c8721bf40ffe
Btrfs: enforce min_bytes parameter during extent allocation

Commit 697f5afae597a0bc2dfa5f6d4a62674e14ec2d61 changed preallocation of
extents to cap the max size we try to allocate.  It's a valid change,
but the extent reservation code is also used by balance, and that
can't tolerate a smaller extent being allocated.

__btrfs_prealloc_file_range already has a min_size parameter, which is
used by relocation to request a specific extent size.  This commit
adds an extra check to enforce that minimum extent size.

Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Reported-by: Stefan Behrens <sbehrens@giantdisaster.de>
fs/btrfs/inode.c