OSDN Git Service

Btrfs: account for large extents with enospc
authorJosef Bacik <jbacik@fb.com>
Wed, 11 Feb 2015 20:08:59 +0000 (15:08 -0500)
committerChris Mason <clm@fb.com>
Sat, 14 Feb 2015 16:22:48 +0000 (08:22 -0800)
commitdcab6a3b2ae657a2017637083c28ee303b6b1b8e
tree4aa9951e7ab997702f90aec9882f305e1885fc40
parent3266789f9d08b27275bae5ab1dcd27d1bbf15e79
Btrfs: account for large extents with enospc

On our gluster boxes we stream large tar balls of backups onto our fses.  With
160gb of ram this means we get really large contiguous ranges of dirty data, but
the way our ENOSPC stuff works is that as long as it's contiguous we only hold
metadata reservation for one extent.  The problem is we limit our extents to
128mb, so we'll end up with at least 800 extents so our enospc accounting is
quite a bit lower than what we need.  To keep track of this make sure we
increase outstanding_extents for every multiple of the max extent size so we can
be sure to have enough reserved metadata space.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/ctree.h
fs/btrfs/extent-tree.c
fs/btrfs/extent_io.c
fs/btrfs/inode.c