summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/free-space-cache.c
diff options
context:
space:
mode:
authorJosef Bacik <jbacik@fb.com>2015-10-01 14:54:10 -0400
committerChris Mason <clm@fb.com>2015-10-21 18:55:37 -0700
commita5e681d9bd641c4f0677e87d3a0c92a8f4f16293 (patch)
treef10e2f374d3309bdcb5afb24ec0018d882a4537c /fs/btrfs/free-space-cache.c
parent2968b1f48bd7366dd7310acde1ee6d1bf7791142 (diff)
downloadtalos-op-linux-a5e681d9bd641c4f0677e87d3a0c92a8f4f16293.tar.gz
talos-op-linux-a5e681d9bd641c4f0677e87d3a0c92a8f4f16293.zip
Btrfs: cut down on loops through the allocator
We try really really hard to make allocations, but sometimes it is just not going to happen, especially when free space is extremely fragmented. So add a few short cuts through the looping states. For example if we couldn't allocate a chunk, just go straight to the NO_EMPTY_SIZE loop. If there are no uncached block groups and we've done a full search, go straight to the ALLOC_CHUNK stage. And finally if we already have empty_size and empty_cluster set to 0 go ahead and return -ENOSPC. Thanks, Signed-off-by: Josef Bacik <jbacik@fb.com> Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs/btrfs/free-space-cache.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud