diff options
author | Naohiro Aota <naohiro.aota@wdc.com> | 2020-02-25 04:56:25 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2020-03-23 17:01:51 +0100 |
commit | 45d8e033b2354e74a3f80cffec0b0b1aa099f4c7 (patch) | |
tree | 1bfb8f3610e0f1df8de39aac1252a66a42861df3 /fs/btrfs/extent-tree.c | |
parent | btrfs: factor out chunk_allocation_failed() for extent allocation (diff) | |
download | linux-45d8e033b2354e74a3f80cffec0b0b1aa099f4c7.tar.xz linux-45d8e033b2354e74a3f80cffec0b0b1aa099f4c7.zip |
btrfs: skip LOOP_NO_EMPTY_SIZE if not clustered allocation
LOOP_NO_EMPTY_SIZE is solely dedicated for clustered allocation. So, we
can skip this stage and give up the allocation.
Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/extent-tree.c')
-rw-r--r-- | fs/btrfs/extent-tree.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index bcffb96d87c6..1d895df67b3b 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -3835,6 +3835,9 @@ static int find_free_extent_update_loop(struct btrfs_fs_info *fs_info, } if (ffe_ctl->loop == LOOP_NO_EMPTY_SIZE) { + if (ffe_ctl->policy != BTRFS_EXTENT_ALLOC_CLUSTERED) + return -ENOSPC; + /* * Don't loop again if we already have no empty_size and * no empty_cluster. |