This reverts commit 5500cdbe14d7435e04f66ff3cfb8ecd8b8e44ebf.

We had numerous reports of premature ENOSPC that were bisected to this
patch. Reverting will not break things but a warning in 'use_block_rsv'
may show up in the syslog.

There's no alternative fix in sight and the ENOSPC problem affects all
3.3 btrfs users during normal filesystem use.

CC: [email protected]
CC: Liu Bo <[email protected]>
CC: Chris Mason <[email protected]>
Signed-off-by: David Sterba <[email protected]>
---
 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 a844204..ace5e8c 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -4205,7 +4205,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.9

--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to