]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: don't keep trying to build clusters if we are fragmented
authorJosef Bacik <jbacik@fb.com>
Fri, 2 Oct 2015 19:25:10 +0000 (15:25 -0400)
committerChris Mason <clm@fb.com>
Thu, 22 Oct 2015 01:55:39 +0000 (18:55 -0700)
commita1ffe67549296b19d20ed9097510732227323dda
tree1b97ad895f5546f867d0b12df3910848e69f1016
parentb22505420c47c4b42dbc621e912c48f90ac4194a
Btrfs: don't keep trying to build clusters if we are fragmented

If we are extremely fragmented then we won't be able to create a free_cluster.
So if this happens set last_ptr->fragmented so that all future allcations will
give up trying to create a cluster.  When we unpin extents we will unset
->fragmented if we free up a sufficient amount of space in a block group.
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
fs/btrfs/free-space-cache.c