summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ctree.h
diff options
context:
space:
mode:
authorChris Mason2008-07-29 22:15:18 +0200
committerChris Mason2008-09-25 17:04:05 +0200
commitab78c84de1ce4db1b2a2cef361625ad80abbab3f (patch)
treea9726645832b50da1da9a9690c4200c0f198ce7d /fs/btrfs/ctree.h
parentBtrfs: Fix version.sh when used outside of an hg repo (diff)
downloadkernel-qcow2-linux-ab78c84de1ce4db1b2a2cef361625ad80abbab3f.tar.gz
kernel-qcow2-linux-ab78c84de1ce4db1b2a2cef361625ad80abbab3f.tar.xz
kernel-qcow2-linux-ab78c84de1ce4db1b2a2cef361625ad80abbab3f.zip
Btrfs: Throttle operations if the reference cache gets too large
A large reference cache is directly related to a lot of work pending for the cleaner thread. This throttles back new operations based on the size of the reference cache so the cleaner thread will be able to keep up. Overall, this actually makes the FS faster because the cleaner thread will be more likely to find things in cache. Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r--fs/btrfs/ctree.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 4eca0aa1ce74..5517dfc6f71c 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -580,6 +580,7 @@ struct btrfs_fs_info {
int do_barriers;
int closing;
atomic_t throttles;
+ atomic_t throttle_gen;
u64 total_pinned;
struct list_head dirty_cowonly_roots;