summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ctree.h
diff options
context:
space:
mode:
authorJosef Bacik2015-02-11 21:08:59 +0100
committerChris Mason2015-02-14 17:22:48 +0100
commitdcab6a3b2ae657a2017637083c28ee303b6b1b8e (patch)
tree4aa9951e7ab997702f90aec9882f305e1885fc40 /fs/btrfs/ctree.h
parentBtrfs: don't set and clear delalloc for O_DIRECT writes (diff)
downloadkernel-qcow2-linux-dcab6a3b2ae657a2017637083c28ee303b6b1b8e.tar.gz
kernel-qcow2-linux-dcab6a3b2ae657a2017637083c28ee303b6b1b8e.tar.xz
kernel-qcow2-linux-dcab6a3b2ae657a2017637083c28ee303b6b1b8e.zip
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>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r--fs/btrfs/ctree.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index d3562dd43c66..b3dd55f52f71 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -198,6 +198,8 @@ static int btrfs_csum_sizes[] = { 4, 0 };
#define BTRFS_DIRTY_METADATA_THRESH (32 * 1024 * 1024)
+#define BTRFS_MAX_EXTENT_SIZE (128 * 1024 * 1024)
+
/*
* The key defines the order in the tree, and so it also defines (optimal)
* block layout.