lkml.org 
[lkml]   [2011]   [Sep]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[patch]mm: add more blk plug
From
Date
Some filesystems implement .writepages. We don't have blk plug
in such filesystems for .writepages.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>

diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index 0e309cd..b9e73a1 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -1253,13 +1253,16 @@ EXPORT_SYMBOL(generic_writepages);
int do_writepages(struct address_space *mapping, struct writeback_control *wbc)
{
int ret;
+ struct blk_plug plug;

if (wbc->nr_to_write <= 0)
return 0;
+ blk_start_plug(&plug);
if (mapping->a_ops->writepages)
ret = mapping->a_ops->writepages(mapping, wbc);
else
ret = generic_writepages(mapping, wbc);
+ blk_finish_plug(&plug);
return ret;
}




\
 
 \ /
  Last update: 2011-09-26 04:27    [W:0.058 / U:1.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site