mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +03:00
filters: power2 devs get precedence if PVIDs match
Give precedence to EMC "power2" devices with duplicate PVIDs like we already do with "emcpower" devices.
This commit is contained in:
parent
69ae454d4d
commit
cbfb5a98b5
@ -1,5 +1,6 @@
|
||||
Version 2.02.99 -
|
||||
===================================
|
||||
Give precedence to EMC power2 devices with duplicate PVIDs.
|
||||
Add --validate option to lvm dumpconfig to validate current config on demand.
|
||||
Add --ignoreadvanced and --ignoreunsupported switch to lvm dumpconfig.
|
||||
Add --withcomments and --withversions switch to lvm dumpconfig.
|
||||
|
@ -42,6 +42,7 @@ static int _blkext_major = -1;
|
||||
static int _drbd_major = -1;
|
||||
static int _device_mapper_major = -1;
|
||||
static int _emcpower_major = -1;
|
||||
static int _power2_major = -1;
|
||||
|
||||
int dm_major(void)
|
||||
{
|
||||
@ -71,6 +72,9 @@ int dev_subsystem_part_major(const struct device *dev)
|
||||
if (MAJOR(dev->dev) == _emcpower_major)
|
||||
return 1;
|
||||
|
||||
if (MAJOR(dev->dev) == _power2_major)
|
||||
return 1;
|
||||
|
||||
if ((MAJOR(dev->dev) == _blkext_major) &&
|
||||
(get_primary_dev(sysfs_dir_path(), dev, &primary_dev)) &&
|
||||
(MAJOR(primary_dev) == _md_major))
|
||||
@ -90,6 +94,9 @@ const char *dev_subsystem_name(const struct device *dev)
|
||||
if (MAJOR(dev->dev) == _emcpower_major)
|
||||
return "EMCPOWER";
|
||||
|
||||
if (MAJOR(dev->dev) == _power2_major)
|
||||
return "POWER2";
|
||||
|
||||
if (MAJOR(dev->dev) == _blkext_major)
|
||||
return "BLKEXT";
|
||||
|
||||
@ -228,6 +235,9 @@ static int _scan_proc_dev(const char *proc, const struct dm_config_node *cn)
|
||||
if (!strncmp("emcpower", line + i, 8) && isspace(*(line + i + 8)))
|
||||
_emcpower_major = line_maj;
|
||||
|
||||
if (!strncmp("power2", line + i, 6) && isspace(*(line + i + 6)))
|
||||
_power2_major = line_maj;
|
||||
|
||||
/* Look for device-mapper device */
|
||||
/* FIXME Cope with multiple majors */
|
||||
if (!strncmp("device-mapper", line + i, 13) && isspace(*(line + i + 13)))
|
||||
|
Loading…
Reference in New Issue
Block a user