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:
parent
80e6097ea6
commit
2e05f6018b
@ -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);
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user