diff options
author | Chris Mason <chris.mason@oracle.com> | 2008-11-20 10:46:35 -0500 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-11-20 10:46:35 -0500 |
commit | 0e6bd956ed238eb2f69386f251847fe3163532e1 (patch) | |
tree | 72b99621e0d4f187aca1214b0a5faa9a71768efd | |
parent | 43dd729b862f4a053310f75d3ee559b678772f59 (diff) |
Btrfs: only flush down bios for writeback pages
The btrfs write_cache_pages call has a flush function so that it submits
the bio it has been building before it waits on any writeback pages.
This adds a check so that flush only happens on writeback pages.
Signed-off-by: Chris Mason <chris.mason@oracle.com>
-rw-r--r-- | fs/btrfs/extent_io.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 3a65c10dce3..87dba851793 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -2462,7 +2462,8 @@ retry: } if (wbc->sync_mode != WB_SYNC_NONE) { - flush_fn(data); + if (PageWriteback(page)) + flush_fn(data); wait_on_page_writeback(page); } |