mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +03:00
Give priority to emcpower devices with duplicate PVIDs.
This commit is contained in:
parent
e33fd978a8
commit
1e482f7ca6
@ -1,5 +1,6 @@
|
||||
Version 2.02.89 -
|
||||
==================================
|
||||
Give priority to emcpower devices with duplicate PVIDs.
|
||||
Add check for error in _adjust_policy_params() (lvextend --use-policies).
|
||||
Supports rounding of percentage (%LV, %VG...) for LV resize upward.
|
||||
Use dmeventd_lvm2_command in dmeventd plugins snapshot, raid, mirror.
|
||||
|
@ -98,7 +98,7 @@ static void _get_sysfs_dir(struct cmd_context *cmd)
|
||||
}
|
||||
|
||||
if (!(fp = fopen(proc_mounts, "r"))) {
|
||||
log_sys_error("_get_sysfs_dir: fopen %s", proc_mounts);
|
||||
log_sys_error("_get_sysfs_dir fopen", proc_mounts);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -44,6 +44,7 @@ static int _md_major = -1;
|
||||
static int _blkext_major = -1;
|
||||
static int _drbd_major = -1;
|
||||
static int _device_mapper_major = -1;
|
||||
static int _emcpower_major = -1;
|
||||
|
||||
int dm_major(void)
|
||||
{
|
||||
@ -70,6 +71,9 @@ int dev_subsystem_part_major(const struct device *dev)
|
||||
if (MAJOR(dev->dev) == _drbd_major)
|
||||
return 1;
|
||||
|
||||
if (MAJOR(dev->dev) == _emcpower_major)
|
||||
return 1;
|
||||
|
||||
if ((MAJOR(dev->dev) == _blkext_major) &&
|
||||
(get_primary_dev(sysfs_dir_path(), dev, &primary_dev)) &&
|
||||
(MAJOR(primary_dev) == _md_major))
|
||||
@ -86,6 +90,9 @@ const char *dev_subsystem_name(const struct device *dev)
|
||||
if (MAJOR(dev->dev) == _drbd_major)
|
||||
return "DRBD";
|
||||
|
||||
if (MAJOR(dev->dev) == _emcpower_major)
|
||||
return "EMCPOWER";
|
||||
|
||||
if (MAJOR(dev->dev) == _blkext_major)
|
||||
return "BLKEXT";
|
||||
|
||||
@ -246,6 +253,10 @@ static int _scan_proc_dev(const char *proc, const struct dm_config_node *cn)
|
||||
if (!strncmp("drbd", line + i, 4) && isspace(*(line + i + 4)))
|
||||
_drbd_major = line_maj;
|
||||
|
||||
/* Look for EMC powerpath */
|
||||
if (!strncmp("emcpower", line + i, 8) && isspace(*(line + i + 8)))
|
||||
_emcpower_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