1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

activate: kvdo modprobe workaround

To support autoloading of VDO dm target driver loading of 'kvdo'
kernel module is needed - ATM it's not using 'dm-vdo' name.
So to support this strange name - add temporarily solution to
autoload  kvdo kernel module in this case.
This commit is contained in:
Zdenek Kabelac 2018-06-29 11:02:24 +02:00
parent 80e6097ea6
commit 2e05f6018b
2 changed files with 7 additions and 0 deletions

View File

@ -585,6 +585,12 @@ int module_present(struct cmd_context *cmd, const char *target_name)
}
#ifdef MODPROBE_CMD
if (strcmp(target_name, MODULE_NAME_VDO) == 0) {
argv[1] = target_name; /* ATM kvdo is without dm- prefix */
if ((ret = exec_cmd(cmd, argv, NULL, 0)))
return ret;
}
if (dm_snprintf(module, sizeof(module), "dm-%s", target_name) < 0) {
log_error("module_present module name too long: %s",
target_name);

View File

@ -271,6 +271,7 @@ void fs_unlock(void);
#define MODULE_NAME_MIRROR TARGET_NAME_MIRROR
#define MODULE_NAME_SNAPSHOT TARGET_NAME_SNAPSHOT
#define MODULE_NAME_RAID TARGET_NAME_RAID
#define MODULE_NAME_VDO "kvdo" /* does NOT use dm- prefix */
#define MODULE_NAME_ZERO TARGET_NAME_ZERO
#endif