]> git.hungrycats.org Git - linux/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)
committerZygo Blaxell <zblaxell@serenity.furryterror.org>
Wed, 28 Oct 2015 01:12:57 +0000 (21:12 -0400)
commit7abcb086c18fddd492a8d45d04d6937a899e03e1
treed79586148d69f6d59cd2335404b57b8524103c8f
parent402ceffcc414d95c2ff3edaa44b33002b2dce476
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>
(cherry picked from commit 1777c70a435eb1c2f109d946f70b4c23498ec8f5)
(cherry picked from commit 62791c26684ec3117037e8968a045eb35a300519)
fs/btrfs/ctree.h
fs/btrfs/extent-tree.c
fs/btrfs/free-space-cache.c