diff options
author | Shaohua Li <shaohua.li@intel.com> | 2011-10-18 14:55:51 (GMT) |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2011-10-18 14:55:51 (GMT) |
commit | 1bce63d1a2a2c8929442b79acd4eab2e3db10a0b (patch) | |
tree | 2dfdd7f28440bca2ba5932c708f541c8a6a21d06 /fs/ext4 | |
parent | f6f96fdb8c2779f9bd8ed7b0b08405b4439c982b (diff) | |
download | linux-fsl-qoriq-1bce63d1a2a2c8929442b79acd4eab2e3db10a0b.tar.xz |
ext4: add block plug for .writepages
Add block plug for ext4 .writepages. Though ext4 .writepages
already handles request merge very well, block plug is still
helpful to reduce block lock contention.
Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4')
-rw-r--r-- | fs/ext4/inode.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 4863238..081bb25 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -2160,6 +2160,7 @@ static int ext4_da_writepages(struct address_space *mapping, struct ext4_sb_info *sbi = EXT4_SB(mapping->host->i_sb); pgoff_t done_index = 0; pgoff_t end; + struct blk_plug plug; trace_ext4_da_writepages(inode, wbc); @@ -2238,6 +2239,7 @@ retry: if (wbc->sync_mode == WB_SYNC_ALL || wbc->tagged_writepages) tag_pages_for_writeback(mapping, index, end); + blk_start_plug(&plug); while (!ret && wbc->nr_to_write > 0) { /* @@ -2302,6 +2304,7 @@ retry: */ break; } + blk_finish_plug(&plug); if (!io_done && !cycled) { cycled = 1; index = 0; |