From: Mikulas Patocka Date: Wed, 19 Jul 2017 15:24:08 +0000 (-0400) Subject: dm integrity: use plugging when writing the journal X-Git-Tag: v4.13-rc3~15^2~11 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a7c3e62bdc71d33f75803115d44e3ee7dab3d811;p=platform%2Fkernel%2Flinux-exynos.git dm integrity: use plugging when writing the journal When copying data from the journal to the appropriate place, we submit many IOs. Some of these IOs could go to adjacent areas. Use on-stack plugging so that adjacent IOs get merged during submission. Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer --- diff --git a/drivers/md/dm-integrity.c b/drivers/md/dm-integrity.c index 4b2fd52..be3b6f4 100644 --- a/drivers/md/dm-integrity.c +++ b/drivers/md/dm-integrity.c @@ -1823,6 +1823,9 @@ static void do_journal_write(struct dm_integrity_c *ic, unsigned write_start, { 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); @@ -1947,6 +1950,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);