aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-table.c
diff options
context:
space:
mode:
authorMike Snitzer <snitzer@redhat.com>2013-10-24 14:10:29 -0400
committerMike Snitzer <snitzer@redhat.com>2013-11-09 18:20:21 -0500
commit7833b08e18241a1c35c09ef38be840cbf6c58acf (patch)
tree0fd074d8dbc87cba4e81ff46e042a2e62869cfc6 /drivers/md/dm-table.c
parented04d98169f1c33ebc79f510c855eed83924d97f (diff)
dm table: print error on preresume failure
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>
Diffstat (limited to 'drivers/md/dm-table.c')
-rw-r--r--drivers/md/dm-table.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c
index 41d907b58f7e..465f08ca62b1 100644
--- a/drivers/md/dm-table.c
+++ b/drivers/md/dm-table.c
@@ -1562,8 +1562,11 @@ int dm_table_resume_targets(struct dm_table *t)
1562 continue; 1562 continue;
1563 1563
1564 r = ti->type->preresume(ti); 1564 r = ti->type->preresume(ti);
1565 if (r) 1565 if (r) {
1566 DMERR("%s: %s: preresume failed, error = %d",
1567 dm_device_name(t->md), ti->type->name, r);
1566 return r; 1568 return r;
1569 }
1567 } 1570 }
1568 1571
1569 for (i = 0; i < t->num_targets; i++) { 1572 for (i = 0; i < t->num_targets; i++) {