aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-table.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/dm-table.c')
-rw-r--r--drivers/md/dm-table.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c
index 827b648fac50..75fe9493e6af 100644
--- a/drivers/md/dm-table.c
+++ b/drivers/md/dm-table.c
@@ -17,6 +17,8 @@
17#include <linux/mutex.h> 17#include <linux/mutex.h>
18#include <asm/atomic.h> 18#include <asm/atomic.h>
19 19
20#define DM_MSG_PREFIX "table"
21
20#define MAX_DEPTH 16 22#define MAX_DEPTH 16
21#define NODE_SIZE L1_CACHE_BYTES 23#define NODE_SIZE L1_CACHE_BYTES
22#define KEYS_PER_NODE (NODE_SIZE / sizeof(sector_t)) 24#define KEYS_PER_NODE (NODE_SIZE / sizeof(sector_t))
@@ -715,15 +717,14 @@ int dm_table_add_target(struct dm_table *t, const char *type,
715 memset(tgt, 0, sizeof(*tgt)); 717 memset(tgt, 0, sizeof(*tgt));
716 718
717 if (!len) { 719 if (!len) {
718 tgt->error = "zero-length target"; 720 DMERR("%s: zero-length target", dm_device_name(t->md));
719 DMERR("%s", tgt->error);
720 return -EINVAL; 721 return -EINVAL;
721 } 722 }
722 723
723 tgt->type = dm_get_target_type(type); 724 tgt->type = dm_get_target_type(type);
724 if (!tgt->type) { 725 if (!tgt->type) {
725 tgt->error = "unknown target type"; 726 DMERR("%s: %s: unknown target type", dm_device_name(t->md),
726 DMERR("%s", tgt->error); 727 type);
727 return -EINVAL; 728 return -EINVAL;
728 } 729 }
729 730
@@ -760,7 +761,7 @@ int dm_table_add_target(struct dm_table *t, const char *type,
760 return 0; 761 return 0;
761 762
762 bad: 763 bad:
763 DMERR("%s", tgt->error); 764 DMERR("%s: %s: %s", dm_device_name(t->md), type, tgt->error);
764 dm_put_target_type(tgt->type); 765 dm_put_target_type(tgt->type);
765 return r; 766 return r;
766} 767}