projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c70e213
)
btrfs: skip LOOP_NO_EMPTY_SIZE if not clustered allocation
author
Naohiro Aota
<naohiro.aota@wdc.com>
Tue, 25 Feb 2020 03:56:25 +0000
(12:56 +0900)
committer
David Sterba
<dsterba@suse.com>
Mon, 23 Mar 2020 16:01:51 +0000
(17:01 +0100)
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>
fs/btrfs/extent-tree.c
patch
|
blob
|
history
diff --git
a/fs/btrfs/extent-tree.c
b/fs/btrfs/extent-tree.c
index bcffb96d87c60d3ff861d9072ca6f512230f0c39..1d895df67b3b6039e50979e50ec3f72c490eedc4 100644
(file)
--- 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.