[prev in list] [next in list] [prev in thread] [next in thread] 

List:       git-commits-head
Subject:    Btrfs: use the new helper wbc_to_write_flags
From:       "Linux Kernel Mailing List" <linux-kernel () vger ! kernel ! org>
Date:       2017-09-29 20:02:03
Message-ID: 20170929200203.8AF9221B60 () pdx-korg-gitolite-1 ! ci ! codeaurora ! org
[Download RAW message or body]

Web:        https://git.kernel.org/torvalds/c/ff40adf7fbdff96860b1153332c0b1c7bab6e0c1
Commit:     ff40adf7fbdff96860b1153332c0b1c7bab6e0c1
Parent:     db95c876c568cef951fbbd4c0118cb5386e4bb99
Refname:    refs/heads/master
Author:     Liu Bo <bo.li.liu@oracle.com>
AuthorDate: Thu Aug 24 18:19:48 2017 -0600
Committer:  David Sterba <dsterba@suse.com>
CommitDate: Tue Sep 26 14:48:14 2017 +0200

    Btrfs: use the new helper wbc_to_write_flags
    
    This updates btrfs to use the helper wbc_to_write_flags which has been
    applied in ext4/xfs/f2fs/block.
    
    Please note that, with this, btrfs's dirty pages written by a
    writeback job will carry the flag REQ_BACKGROUND, which is currently
    used by writeback-throttle to determine whether it should go to get a
    request or wait.
    
    Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
    Reviewed-by: David Sterba <dsterba@suse.com>
    Signed-off-by: David Sterba <dsterba@suse.com>
---
 fs/btrfs/extent_io.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index d17783d70228..4ead6da5a645 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -3471,8 +3471,7 @@ static int __extent_writepage(struct page *page, struct writeback_control *wbc,
 	unsigned int write_flags = 0;
 	unsigned long nr_written = 0;
 
-	if (wbc->sync_mode == WB_SYNC_ALL)
-		write_flags = REQ_SYNC;
+	write_flags = wbc_to_write_flags(wbc);
 
 	trace___extent_writepage(page, inode, wbc);
 
@@ -3718,7 +3717,7 @@ static noinline_for_stack int write_one_eb(struct extent_buffer *eb,
 	unsigned long i, num_pages;
 	unsigned long bio_flags = 0;
 	unsigned long start, end;
-	unsigned int write_flags = (epd->sync_io ? REQ_SYNC : 0) | REQ_META;
+	unsigned int write_flags = wbc_to_write_flags(wbc) | REQ_META;
 	int ret = 0;
 
 	clear_bit(EXTENT_BUFFER_WRITE_ERR, &eb->bflags);
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic