]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: keep track of max_extent_size per space_info
authorJosef Bacik <jbacik@fb.com>
Tue, 29 Sep 2015 15:40:47 +0000 (11:40 -0400)
committerChris Mason <clm@fb.com>
Thu, 22 Oct 2015 01:55:19 +0000 (18:55 -0700)
commitf7cc24a6d68c020cff50f3bfbbe767e248fbd7f7
treeae850a309ddfe971d0e862aafbfb951163b5a842
parentbc817e78000ee6069c24a64fab9fb5e86385ffa0
Btrfs: keep track of max_extent_size per space_info

When we are heavily fragmented we can induce a lot of latency trying to make an
allocation happen that is simply not going to happen.  Thankfully we keep track
of our max_extent_size when going through the allocator, so if we get to the
point where we are exiting find_free_extent with ENOSPC then set our
space_info->max_extent_size so we can keep future allocations from having to pay
this cost.  We reset the max_extent_size whenever we release pinned bytes back
into this space info so we can redo all the work.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/ctree.h
fs/btrfs/extent-tree.c