Skip to content

Commit

Permalink
Btrfs: only flush down bios for writeback pages
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Chris Mason committed Nov 20, 2008
1 parent 43dd729 commit 0e6bd95
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/btrfs/extent_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -2462,7 +2462,8 @@ int extent_write_cache_pages(struct extent_io_tree *tree,
}

if (wbc->sync_mode != WB_SYNC_NONE) {
flush_fn(data);
if (PageWriteback(page))
flush_fn(data);
wait_on_page_writeback(page);
}

Expand Down

0 comments on commit 0e6bd95

Please sign in to comment.