Skip to content

Commit

Permalink
dm cache: use dm_submit_bio_remap
Browse files Browse the repository at this point in the history
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
  • Loading branch information
snitm committed Mar 10, 2022
1 parent b7f8dff commit 69596f5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions drivers/md/dm-cache-target.c
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,7 @@ static void accounted_complete(struct cache *cache, struct bio *bio)
static void accounted_request(struct cache *cache, struct bio *bio)
{
accounted_begin(cache, bio);
submit_bio_noacct(bio);
dm_submit_bio_remap(bio, NULL);
}

static void issue_op(struct bio *bio, void *context)
Expand Down Expand Up @@ -1708,7 +1708,7 @@ static bool process_bio(struct cache *cache, struct bio *bio)
bool commit_needed;

if (map_bio(cache, bio, get_bio_block(cache, bio), &commit_needed) == DM_MAPIO_REMAPPED)
submit_bio_noacct(bio);
dm_submit_bio_remap(bio, NULL);

return commit_needed;
}
Expand Down Expand Up @@ -1774,7 +1774,7 @@ static bool process_discard_bio(struct cache *cache, struct bio *bio)

if (cache->features.discard_passdown) {
remap_to_origin(cache, bio);
submit_bio_noacct(bio);
dm_submit_bio_remap(bio, NULL);
} else
bio_endio(bio);

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

cache->ti = ca->ti;
ti->private = cache;
ti->accounts_remapped_io = true;
ti->num_flush_bios = 2;
ti->flush_supported = true;

Expand Down

0 comments on commit 69596f5

Please sign in to comment.