aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/disk-io.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r--fs/btrfs/disk-io.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index de0552532d23..eef4ab56b9ca 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -210,7 +210,7 @@ static int btree_writepages(struct address_space *mapping,
210{ 210{
211 struct extent_map_tree *tree; 211 struct extent_map_tree *tree;
212 tree = &BTRFS_I(mapping->host)->extent_tree; 212 tree = &BTRFS_I(mapping->host)->extent_tree;
213 if (wbc->sync_mode == WB_SYNC_NONE && current_is_pdflush()) { 213 if (wbc->sync_mode == WB_SYNC_NONE) {
214 u64 num_dirty; 214 u64 num_dirty;
215 u64 start = 0; 215 u64 start = 0;
216 unsigned long thresh = 96 * 1024 * 1024; 216 unsigned long thresh = 96 * 1024 * 1024;
@@ -218,6 +218,11 @@ static int btree_writepages(struct address_space *mapping,
218 if (wbc->for_kupdate) 218 if (wbc->for_kupdate)
219 return 0; 219 return 0;
220 220
221 if (current_is_pdflush()) {
222 thresh = 96 * 1024 * 1024;
223 } else {
224 thresh = 8 * 1024 * 1024;
225 }
221 num_dirty = count_range_bits(tree, &start, thresh, EXTENT_DIRTY); 226 num_dirty = count_range_bits(tree, &start, thresh, EXTENT_DIRTY);
222 if (num_dirty < thresh) { 227 if (num_dirty < thresh) {
223 return 0; 228 return 0;