Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 128553
b: refs/heads/master
c: 448d640
h: refs/heads/master
i:
  128551: 7b2d688
v: v3
  • Loading branch information
Chris Mason committed Sep 25, 2008
1 parent f5f563e commit 8aa32ec
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8790bad7fb5ac4929dcd52c5dd8d6b81f8c05be8
refs/heads/master: 448d640b668dae3928591e83f2bf4ca9f4c06e52
4 changes: 4 additions & 0 deletions trunk/fs/btrfs/disk-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,10 @@ static int btree_writepages(struct address_space *mapping,
u64 num_dirty;
u64 start = 0;
unsigned long thresh = 96 * 1024 * 1024;

if (wbc->for_kupdate)
return 0;

num_dirty = count_range_bits(tree, &start, thresh, EXTENT_DIRTY);
if (num_dirty < thresh) {
return 0;
Expand Down
3 changes: 2 additions & 1 deletion trunk/fs/btrfs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,8 @@ static ssize_t btrfs_file_write(struct file *file, const char __user *buf,
num_written += write_bytes;

balance_dirty_pages_ratelimited_nr(inode->i_mapping, num_pages);
btrfs_btree_balance_dirty(root, 1);
if (num_pages < (root->leafsize >> PAGE_CACHE_SHIFT) + 1)
btrfs_btree_balance_dirty(root, 1);
cond_resched();
}
mutex_unlock(&inode->i_mutex);
Expand Down

0 comments on commit 8aa32ec

Please sign in to comment.