Linux Kernels

Btrfs: Only limit btree writeback for pdflush

This change “Btrfs: Only limit btree writeback for pdflush” (commit 8790bad) in Linux kernel is authored by Chris Mason <chris.mason [at] oracle.com> on Mon Nov 26 19:47:05 2007 -0500.

Description of "Btrfs: Only limit btree writeback for pdflush"

The change “Btrfs: Only limit btree writeback for pdflush” introduces changes as follows.

Btrfs: Only limit btree writeback for pdflush

Signed-off-by: Chris Mason <chris.mason@oracle.com>

Linux kernel releases containing commit 8790bad

The Linux kernel releases containing this commit are as follows.

Linux kernel code changes from "Btrfs: Only limit btree writeback for pdflush"

There are 2 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 fs/btrfs/disk-io.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 28e9ef8a3253..8a74f9027d65 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,
 {
 	struct extent_map_tree *tree;
 	tree = &BTRFS_I(mapping->host)->extent_tree;
-	if (wbc->sync_mode == WB_SYNC_NONE) {
+	if (wbc->sync_mode == WB_SYNC_NONE && current_is_pdflush()) {
 		u64 num_dirty;
 		u64 start = 0;
 		unsigned long thresh = 96 * 1024 * 1024;

The commit for this change in Linux stable tree is 8790bad (patch).

Last modified: 2020/01/11 09:52