Btrfs: limit the global reserve to 512mb
authorJosef Bacik <jbacik@fusionio.com>
Tue, 26 Mar 2013 19:31:45 +0000 (15:31 -0400)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 10 Apr 2013 02:20:05 +0000 (03:20 +0100)
commit135fbd7c066572e0f6b2af2c68bcdfabfc418f5d
tree5d4ca5b1befcea9389e6e4d3295a56973287f080
parent2b79fa8fddde2d070ca28a2d94394c39bfd8d741
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: Ben Hutchings <ben@decadent.org.uk>
fs/btrfs/extent-tree.c