aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorJosef Bacik2013-03-26 14:31:45 -0500
committerGreg Kroah-Hartman2013-04-05 11:26:02 -0500
commit3df6391ba957b799fa30cb558d924aee647ccd34 (patch)
treecd77b8d48471e46a12be2f54b2c2ea44960f1669 /fs
parentda3cbc8328e6062dbb2bf4a7d6c5f7a4afbec9df (diff)
downloadkernel-omap-3df6391ba957b799fa30cb558d924aee647ccd34.tar.gz
kernel-omap-3df6391ba957b799fa30cb558d924aee647ccd34.tar.xz
kernel-omap-3df6391ba957b799fa30cb558d924aee647ccd34.zip
Btrfs: limit the global reserve to 512mb
commit fdf30d1c1b386e1b73116cc7e0fb14e962b763b0 upstream. A user reported a problem where he was getting early ENOSPC with hundreds of gigs of free data space and 6 gigs of free metadata space. This is because the global block reserve was taking up the entire free metadata space. This is ridiculous, we have infrastructure in place to throttle if we start using too much of the global reserve, so instead of letting it get this huge just limit it to 512mb so that users can still get work done. This allowed the user to complete his rsync without issues. Thanks Reported-and-tested-by: Stefan Priebe <s.priebe@profihost.ag> Signed-off-by: Josef Bacik <jbacik@fusionio.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/extent-tree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 5a3327b8f90d..1344074c5ebb 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -4308,7 +4308,7 @@ static void update_global_block_rsv(struct btrfs_fs_info *fs_info)
4308 spin_lock(&sinfo->lock); 4308 spin_lock(&sinfo->lock);
4309 spin_lock(&block_rsv->lock); 4309 spin_lock(&block_rsv->lock);
4310 4310
4311 block_rsv->size = num_bytes; 4311 block_rsv->size = min_t(u64, num_bytes, 512 * 1024 * 1024);
4312 4312
4313 num_bytes = sinfo->bytes_used + sinfo->bytes_pinned + 4313 num_bytes = sinfo->bytes_used + sinfo->bytes_pinned +
4314 sinfo->bytes_reserved + sinfo->bytes_readonly + 4314 sinfo->bytes_reserved + sinfo->bytes_readonly +