aboutsummaryrefslogtreecommitdiff
path: root/mm/page-writeback.c
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2010-05-17 12:55:07 +0200
committerJens Axboe <jens.axboe@oracle.com>2010-05-17 12:55:07 +0200
commite913fc825dc685a444cb4c1d0f9d32f372f59861 (patch)
treee470697e43ffe4028ac81c17d3ef90ee9f30bcfb /mm/page-writeback.c
parent69b62d01ec44fe0d505d89917392347732135a4d (diff)
writeback: fix WB_SYNC_NONE writeback from umount
When umount calls sync_filesystem(), we first do a WB_SYNC_NONE writeback to kick off writeback of pending dirty inodes, then follow that up with a WB_SYNC_ALL to wait for it. Since umount already holds the sb s_umount mutex, WB_SYNC_NONE ends up doing nothing and all writeback happens as WB_SYNC_ALL. This can greatly slow down umount, since WB_SYNC_ALL writeback is a data integrity operation and thus a bigger hammer than simple WB_SYNC_NONE. For barrier aware file systems it's a lot slower. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'mm/page-writeback.c')
-rw-r--r--mm/page-writeback.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index d0f2b3765f8..53b2fcf2d28 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -597,7 +597,7 @@ static void balance_dirty_pages(struct address_space *mapping,
(!laptop_mode && ((global_page_state(NR_FILE_DIRTY)
+ global_page_state(NR_UNSTABLE_NFS))
> background_thresh)))
- bdi_start_writeback(bdi, NULL, 0);
+ bdi_start_writeback(bdi, NULL, 0, 0);
}
void set_page_dirty_balance(struct page *page, int page_mkwrite)
@@ -705,7 +705,7 @@ void laptop_mode_timer_fn(unsigned long data)
*/
if (bdi_has_dirty_io(&q->backing_dev_info))
- bdi_start_writeback(&q->backing_dev_info, NULL, nr_pages);
+ bdi_start_writeback(&q->backing_dev_info, NULL, 0, nr_pages);
}
/*