Skip to content

Commit b2b04e7

Browse files
committed
dm: report which conflicting type caused error during table_load()
Eases troubleshooting to know the before vs after types. Signed-off-by: Mike Snitzer <[email protected]>
1 parent 2a2a4c5 commit b2b04e7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/md/dm-ioctl.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1344,7 +1344,8 @@ static int table_load(struct file *filp, struct dm_ioctl *param, size_t param_si
13441344
goto err_unlock_md_type;
13451345
}
13461346
} else if (!is_valid_type(dm_get_md_type(md), dm_table_get_type(t))) {
1347-
DMWARN("can't change device type after initial table load.");
1347+
DMWARN("can't change device type (old=%u vs new=%u) after initial table load.",
1348+
dm_get_md_type(md), dm_table_get_type(t));
13481349
r = -EINVAL;
13491350
goto err_unlock_md_type;
13501351
}

0 commit comments

Comments
 (0)