[dm-devel] [PATCH] dm-integrity: plug I/Os when writing the journal
Mikulas Patocka
mpatocka at redhat.com
Wed Jul 19 15:24:08 UTC 2017
When copying data from the journal to the appropriate place, we submit
many I/Os. Some of these I/Os could go to adjacent areas. This patch uses
the plug mechanism, so that the adjacent I/Os could be merged.
Signed-off-by: Mikulas Patocka <mpatocka at redhat.com>
---
drivers/md/dm-integrity.c | 5 +++++
1 file changed, 5 insertions(+)
Index: linux-2.6/drivers/md/dm-integrity.c
===================================================================
--- linux-2.6.orig/drivers/md/dm-integrity.c
+++ linux-2.6/drivers/md/dm-integrity.c
@@ -1822,6 +1822,9 @@ static void do_journal_write(struct dm_i
{
unsigned i, j, n;
struct journal_completion comp;
+ struct blk_plug plug;
+
+ blk_start_plug(&plug);
comp.ic = ic;
comp.in_flight = (atomic_t)ATOMIC_INIT(1);
@@ -1946,6 +1949,8 @@ skip_io:
dm_bufio_write_dirty_buffers_async(ic->bufio);
+ blk_finish_plug(&plug);
+
complete_journal_op(&comp);
wait_for_completion_io(&comp.comp);
More information about the dm-devel
mailing list