Skip to content
Commit 154ea289 authored by Chris Mason's avatar Chris Mason
Browse files

Btrfs: enforce min_bytes parameter during extent allocation



Commit 24542bf7 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: default avatarChris Mason <chris.mason@fusionio.com>
Reported-by: default avatarStefan Behrens <sbehrens@giantdisaster.de>
parent d7011f5b
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment