]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
btrfs: reset max_extent_size properly
authorJosef Bacik <josef@toxicpanda.com>
Thu, 11 Oct 2018 19:54:03 +0000 (15:54 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Nov 2018 19:12:57 +0000 (11:12 -0800)
commit17a7240a9508d8fbb189456960628170bb9b8833
tree38735895349f28b0e71e02431f3f7cd401cf80ac
parent645dd2f9feab405216397a40b0ed5ef17a6e8aa2
btrfs: reset max_extent_size properly

commit 21a94f7acf0f748599ea552af5d9ee7d7e41c72f upstream.

If we use up our block group before allocating a new one we'll easily
get a max_extent_size that's set really really low, which will result in
a lot of fragmentation.  We need to make sure we're resetting the
max_extent_size when we add a new chunk or add new space.

CC: stable@vger.kernel.org # 4.4+
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/btrfs/extent-tree.c