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>
This commit is contained in:
parent
43dd729b86
commit
0e6bd956ed
|
@ -2462,6 +2462,7 @@ retry:
|
||||||
}
|
}
|
||||||
|
|
||||||
if (wbc->sync_mode != WB_SYNC_NONE) {
|
if (wbc->sync_mode != WB_SYNC_NONE) {
|
||||||
|
if (PageWriteback(page))
|
||||||
flush_fn(data);
|
flush_fn(data);
|
||||||
wait_on_page_writeback(page);
|
wait_on_page_writeback(page);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue