Skip to content

Commit

Permalink
dm cache: log error message if dm_kcopyd_copy() fails
Browse files Browse the repository at this point in the history
A migration failure should be logged (albeit limited).

Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com>
Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
  • Loading branch information
Heinz Mauelshagen authored and Mike Snitzer committed Nov 9, 2013
1 parent 80f659f commit 2c2263c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/md/dm-cache-target.c
Original file line number Diff line number Diff line change
Expand Up @@ -886,8 +886,10 @@ static void issue_copy_real(struct dm_cache_migration *mg)
r = dm_kcopyd_copy(cache->copier, &o_region, 1, &c_region, 0, copy_complete, mg);
}

if (r < 0)
if (r < 0) {
DMERR_LIMIT("issuing migration failed");
migration_failure(mg);
}
}

static void avoid_copy(struct dm_cache_migration *mg)
Expand Down

0 comments on commit 2c2263c

Please sign in to comment.