Home Home > GIT Browse
summaryrefslogtreecommitdiff
blob: 91d27da0ced27d1f7d5615bcabf3a1d7721b3b37 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
From: David Sterba <dsterba@suse.cz>
Date: Sat, 24 Mar 2012 01:01:49 +0100
Subject: [PATCH] Revert "Btrfs: increase the global block reserve estimates"
Patch-mainline: 3.3

This reverts commit 5500cdbe14d7435e04f66ff3cfb8ecd8b8e44ebf.

Reason: causes early ENOSPC

 Btrfs: increase the global block reserve estimates

 When doing IO with large amounts of data fragmentation, the global block
 reserve calulations are too low.  This increases them to avoid
 ENOSPC crashes.

 Signed-off-by: Liu Bo <liubo2009@cn.fujitsu.com>
 Signed-off-by: Chris Mason <chris.mason@oracle.com>

Signed-off-by: David Sterba <dsterba@suse.cz>
---
 fs/btrfs/extent-tree.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 37e0a80..f6f584f 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -4110,7 +4110,7 @@ static u64 calc_global_metadata_size(struct btrfs_fs_info *fs_info)
 	num_bytes += div64_u64(data_used + meta_used, 50);
 
 	if (num_bytes * 3 > meta_used)
-		num_bytes = div64_u64(meta_used, 3) * 2;
+		num_bytes = div64_u64(meta_used, 3);
 
 	return ALIGN(num_bytes, fs_info->extent_root->leafsize << 10);
 }
-- 
1.7.6.233.gd79bc