mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +03:00
lvm_init: don't use name mangling for LVM
LVM has restricter character set that is allowed for VG-LV names and the dm names constructed do not contain any blacklisted characters that would require name mangling. Also, when any other device-mapper device is scanned that could possibly contain such blacklisted characters, we reference the device by its major:minor instead of dm name (e.g. _device_is_usable fn).
This commit is contained in:
parent
b2da0f0a5b
commit
1c4fe47308
@ -1,5 +1,6 @@
|
||||
Version 2.02.107 -
|
||||
==================================
|
||||
Don't use name mangling for LVM - it never uses dm names with wrong char set.
|
||||
Remove default.profile and add {command,metadata}_profile_template.profile.
|
||||
Use proper umask for systemd units generated by lvm2-activation-generator.
|
||||
Check for failing mirror_remove_missing() function.
|
||||
|
@ -35,6 +35,13 @@ static lvm_t _lvm_init(const char *system_dir)
|
||||
if (!udev_init_library_context())
|
||||
stack;
|
||||
|
||||
/*
|
||||
* It's not necessary to use name mangling for LVM:
|
||||
* - the character set used for VG-LV names is subset of udev character set
|
||||
* - when we check other devices (e.g. _device_is_usable fn), we use major:minor, not dm names
|
||||
*/
|
||||
dm_set_name_mangling_mode(DM_STRING_MANGLING_NONE);
|
||||
|
||||
/* create context */
|
||||
/* FIXME: split create_toolcontext */
|
||||
/* FIXME: make all globals configurable */
|
||||
|
@ -1527,6 +1527,13 @@ struct cmd_context *init_lvm(void)
|
||||
if (!udev_init_library_context())
|
||||
stack;
|
||||
|
||||
/*
|
||||
* It's not necessary to use name mangling for LVM:
|
||||
* - the character set used for LV names is subset of udev character set
|
||||
* - when we check other devices (e.g. _device_is_usable fn), we use major:minor, not dm names
|
||||
*/
|
||||
dm_set_name_mangling_mode(DM_STRING_MANGLING_NONE);
|
||||
|
||||
if (!(cmd = create_toolcontext(0, NULL, 1, 0))) {
|
||||
udev_fin_library_context();
|
||||
return_NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user