diff options
author | Mikulas Patocka <mpatocka@redhat.com> | 2017-07-19 11:24:08 -0400 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2017-07-19 19:02:39 -0400 |
commit | a7c3e62bdc71d33f75803115d44e3ee7dab3d811 (patch) | |
tree | e8faf6a031420b7e536785c74661baccc6bddc9c /drivers/md | |
parent | 9dd59727dbc21d33a9add4c5b308a5775cd5a6ef (diff) | |
download | blackbird-op-linux-a7c3e62bdc71d33f75803115d44e3ee7dab3d811.tar.gz blackbird-op-linux-a7c3e62bdc71d33f75803115d44e3ee7dab3d811.zip |
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 <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/dm-integrity.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/md/dm-integrity.c b/drivers/md/dm-integrity.c index 4b2fd524e38d..be3b6f42095c 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); |