summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/file.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2008-01-08 21:46:30 +0100
committerChris Mason <chris.mason@oracle.com>2008-09-25 17:03:59 +0200
commite2008b61401ecb467a8ce1788fcd2116ae1cfbc1 (patch)
tree8f13935108abaca29c894ca1f9309c9813c9e194 /fs/btrfs/file.c
parentBtrfs: Move snapshot creation to commit time (diff)
downloadlinux-e2008b61401ecb467a8ce1788fcd2116ae1cfbc1.tar.xz
linux-e2008b61401ecb467a8ce1788fcd2116ae1cfbc1.zip
Btrfs: Add some simple throttling to wait for data=ordered and snapshot deletion
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/file.c')
-rw-r--r--fs/btrfs/file.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index 0a5f4defe59b..897242e87fa7 100644
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
@@ -800,6 +800,7 @@ static ssize_t btrfs_file_write(struct file *file, const char __user *buf,
balance_dirty_pages_ratelimited_nr(inode->i_mapping, num_pages);
if (num_pages < (root->leafsize >> PAGE_CACHE_SHIFT) + 1)
btrfs_btree_balance_dirty(root, 1);
+ btrfs_throttle(root);
cond_resched();
}
out: