Skip to content

Commit 69596f5

Browse files
committed
dm cache: use dm_submit_bio_remap
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
1 parent b7f8dff commit 69596f5

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

drivers/md/dm-cache-target.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -803,7 +803,7 @@ static void accounted_complete(struct cache *cache, struct bio *bio)
803803
static void accounted_request(struct cache *cache, struct bio *bio)
804804
{
805805
accounted_begin(cache, bio);
806-
submit_bio_noacct(bio);
806+
dm_submit_bio_remap(bio, NULL);
807807
}
808808

809809
static void issue_op(struct bio *bio, void *context)
@@ -1708,7 +1708,7 @@ static bool process_bio(struct cache *cache, struct bio *bio)
17081708
bool commit_needed;
17091709

17101710
if (map_bio(cache, bio, get_bio_block(cache, bio), &commit_needed) == DM_MAPIO_REMAPPED)
1711-
submit_bio_noacct(bio);
1711+
dm_submit_bio_remap(bio, NULL);
17121712

17131713
return commit_needed;
17141714
}
@@ -1774,7 +1774,7 @@ static bool process_discard_bio(struct cache *cache, struct bio *bio)
17741774

17751775
if (cache->features.discard_passdown) {
17761776
remap_to_origin(cache, bio);
1777-
submit_bio_noacct(bio);
1777+
dm_submit_bio_remap(bio, NULL);
17781778
} else
17791779
bio_endio(bio);
17801780

@@ -2356,6 +2356,7 @@ static int cache_create(struct cache_args *ca, struct cache **result)
23562356

23572357
cache->ti = ca->ti;
23582358
ti->private = cache;
2359+
ti->accounts_remapped_io = true;
23592360
ti->num_flush_bios = 2;
23602361
ti->flush_supported = true;
23612362

0 commit comments

Comments
 (0)