From: Shaohua Li <shaohua.li@intel.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Christoph Hellwig <hch@infradead.org>,
lkml <linux-kernel@vger.kernel.org>
Subject: [patch]mm: add more blk plug
Date: Mon, 26 Sep 2011 10:30:26 +0800 [thread overview]
Message-ID: <1317004226.29510.172.camel@sli10-conroe> (raw)
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;
}
next reply other threads:[~2011-09-26 2:25 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-26 2:30 Shaohua Li [this message]
2011-09-26 7:30 ` [patch]mm: add more blk plug Christoph Hellwig
2011-09-26 7:38 ` Shaohua Li
2011-09-26 9:45 ` Christoph Hellwig
2011-09-28 3:09 ` [patch]ext4: add block plug for .writepages Shaohua Li
2011-10-09 6:09 ` Shaohua Li
2011-10-10 16:51 ` Ted Ts'o
2011-10-11 0:07 ` NamJae Jeon
2011-10-11 10:40 ` Kyungmin Park
2011-10-12 0:53 ` Shaohua Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1317004226.29510.172.camel@sli10-conroe \
--to=shaohua.li@intel.com \
--cc=akpm@linux-foundation.org \
--cc=axboe@kernel.dk \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox