dm delay: use dm_submit_bio_remap
authorMike Snitzer <snitzer@redhat.com>
Fri, 18 Feb 2022 04:40:37 +0000 (23:40 -0500)
committerMike Snitzer <snitzer@redhat.com>
Mon, 21 Feb 2022 20:36:34 +0000 (15:36 -0500)
Reviewed-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-delay.c

index 59e51d285b0e5903e612ae617f65db687b58efea..b25b45011b1190f361c8c1dab65ab7815fd18a75 100644 (file)
@@ -72,7 +72,7 @@ static void flush_bios(struct bio *bio)
        while (bio) {
                n = bio->bi_next;
                bio->bi_next = NULL;
-               submit_bio_noacct(bio);
+               dm_submit_bio_remap(bio, NULL, true);
                bio = n;
        }
 }
@@ -232,6 +232,7 @@ out:
 
        ti->num_flush_bios = 1;
        ti->num_discard_bios = 1;
+       ti->accounts_remapped_io = true;
        ti->per_io_data_size = sizeof(struct dm_delay_info);
        return 0;
 
@@ -355,7 +356,7 @@ out:
 
 static struct target_type delay_target = {
        .name        = "delay",
-       .version     = {1, 2, 1},
+       .version     = {1, 3, 0},
        .features    = DM_TARGET_PASSES_INTEGRITY,
        .module      = THIS_MODULE,
        .ctr         = delay_ctr,