mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +03:00
Ignore activation/verify_udev_operations if dm kernel driver vsn < 4.18.
This commit is contained in:
parent
d8ff1b1efb
commit
1485b6fc93
@ -15,6 +15,7 @@ Version 2.02.86 -
|
||||
Fix to preserve exclusive activation of mirror while up-converting.
|
||||
Reject allocation if number of extents is not divisible by area count.
|
||||
Fix issue preventing cluster mirror creation.
|
||||
Ignore activation/verify_udev_operations if dm kernel driver vsn < 4.18.
|
||||
Add activation/verify_udev_operations to lvm.conf, disabled by default.
|
||||
Call vg_mark_partial_lvs() before VG structure is returned from the cache.
|
||||
Remove unused internal flag ACTIVATE_EXCL from the code.
|
||||
|
@ -200,6 +200,21 @@ static void _init_logging(struct cmd_context *cmd)
|
||||
reset_lvm_errno(1);
|
||||
}
|
||||
|
||||
/*
|
||||
* Until the DM_UEVENT_GENERATED_FLAG was introduced in kernel patch
|
||||
* 856a6f1dbd8940e72755af145ebcd806408ecedd
|
||||
* some operations could not be performed by udev, requiring our fallback code.
|
||||
*/
|
||||
static int _dm_driver_has_stable_udev_support()
|
||||
{
|
||||
char vsn[80];
|
||||
unsigned maj, min, patchlevel;
|
||||
|
||||
return driver_version(vsn, sizeof(vsn)) &&
|
||||
(sscanf(vsn, "%u.%u.%u", &maj, &min, &patchlevel) == 3) &&
|
||||
(maj == 4 ? min >= 18 : maj > 4);
|
||||
}
|
||||
|
||||
static int _process_config(struct cmd_context *cmd)
|
||||
{
|
||||
mode_t old_umask;
|
||||
@ -299,6 +314,13 @@ static int _process_config(struct cmd_context *cmd)
|
||||
find_config_tree_int(cmd, "activation/verify_udev_operations",
|
||||
DEFAULT_VERIFY_UDEV_OPERATIONS) : 1;
|
||||
|
||||
/* Do not rely fully on udev if the udev support is known to be incomplete. */
|
||||
if (!cmd->default_settings.udev_fallback && !_dm_driver_has_stable_udev_support()) {
|
||||
log_very_verbose("Kernel driver has incomplete udev support so "
|
||||
"LVM will check and perform some operations itself.");
|
||||
cmd->default_settings.udev_fallback = 1;
|
||||
}
|
||||
|
||||
#else
|
||||
/* We must use old node/symlink creation code if not compiled with udev support at all! */
|
||||
cmd->default_settings.udev_fallback = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user