Skip to content

Commit

Permalink
dm table: print error on preresume failure
Browse files Browse the repository at this point in the history
If preresume fails it is worth logging an error given that a device is
left suspended due to the failure.

This change was motivated by local preresume error logging that was
added to the cache target ("preresume failed").  Elevating this
target-agnostic context for the where the target-specific error occurred
relative to the DM core's callouts makes sense.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Joe Thornber <ejt@redhat.com>
  • Loading branch information
Mike Snitzer committed Nov 9, 2013
1 parent ed04d98 commit 7833b08
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/md/dm-table.c
Original file line number Diff line number Diff line change
Expand Up @@ -1562,8 +1562,11 @@ int dm_table_resume_targets(struct dm_table *t)
continue;

r = ti->type->preresume(ti);
if (r)
if (r) {
DMERR("%s: %s: preresume failed, error = %d",
dm_device_name(t->md), ti->type->name, r);
return r;
}
}

for (i = 0; i < t->num_targets; i++) {
Expand Down

0 comments on commit 7833b08

Please sign in to comment.