@@ -803,7 +803,7 @@ static void accounted_complete(struct cache *cache, struct bio *bio)
803803static 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
809809static 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