summaryrefslogtreecommitdiff
path: root/fs/btrfs/disk-io.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2007-09-17 10:58:06 -0400
committerChris Mason <chris.mason@oracle.com>2008-09-25 11:00:48 -0400
commitd3c2fdcf7b79079f60ac64e61d886964d4647910 (patch)
tree146379e460b1209fef52635bf8e581c68864a452 /fs/btrfs/disk-io.c
parent7d7d6068bee9d8004ea7cc8a2ebda2c99a57caec (diff)
downloadlwn-d3c2fdcf7b79079f60ac64e61d886964d4647910.tar.gz
lwn-d3c2fdcf7b79079f60ac64e61d886964d4647910.zip
Btrfs: Use balance_dirty_pages_nr on btree blocks
btrfs_btree_balance_dirty is changed to pass the number of pages dirtied for more accurate dirty throttling. This lets the VM make better decisions about when to force some writeback. Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r--fs/btrfs/disk-io.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 4296839eea1a..ef6d76f2ec20 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -666,7 +666,8 @@ void btrfs_block_release(struct btrfs_root *root, struct buffer_head *buf)
brelse(buf);
}
-void btrfs_btree_balance_dirty(struct btrfs_root *root)
+void btrfs_btree_balance_dirty(struct btrfs_root *root, unsigned long nr)
{
- balance_dirty_pages_ratelimited(root->fs_info->btree_inode->i_mapping);
+ balance_dirty_pages_ratelimited_nr(
+ root->fs_info->btree_inode->i_mapping, nr);
}