Marcus Meissner
cbe69e3a5d
fix not to support dasd device(bsc#894202) and not start lvm2-lvmetad.socket(bsc#914415) OBS-URL: https://build.opensuse.org/request/show/284435 OBS-URL: https://build.opensuse.org/package/show/Base:System/lvm2?expand=0&rev=123
59 lines
1.7 KiB
Diff
59 lines
1.7 KiB
Diff
Index: LVM2.2.02.114/lib/device/dev-type.c
|
|
===================================================================
|
|
--- LVM2.2.02.114.orig/lib/device/dev-type.c
|
|
+++ LVM2.2.02.114/lib/device/dev-type.c
|
|
@@ -112,6 +112,10 @@ struct dev_types *create_dev_types(const
|
|
if (!strncmp("drbd", line + i, 4) && isspace(*(line + i + 4)))
|
|
dt->drbd_major = line_maj;
|
|
|
|
+ /* Look for DASD */
|
|
+ if (!strncmp("dasd", line + i, 4) && isspace(*(line + i + 4)))
|
|
+ dt->dasd_major = line_maj;
|
|
+
|
|
/* Look for EMC powerpath */
|
|
if (!strncmp("emcpower", line + i, 8) && isspace(*(line + i + 8)))
|
|
dt->emcpower_major = line_maj;
|
|
@@ -203,6 +207,9 @@ int dev_subsystem_part_major(struct dev_
|
|
if (MAJOR(dev->dev) == dt->emcpower_major)
|
|
return 1;
|
|
|
|
+ if (MAJOR(dev->dev) == dt->dasd_major)
|
|
+ return 1;
|
|
+
|
|
if (MAJOR(dev->dev) == dt->power2_major)
|
|
return 1;
|
|
|
|
@@ -222,6 +229,9 @@ const char *dev_subsystem_name(struct de
|
|
if (MAJOR(dev->dev) == dt->drbd_major)
|
|
return "DRBD";
|
|
|
|
+ if (MAJOR(dev->dev) == dt->dasd_major)
|
|
+ return "DASD";
|
|
+
|
|
if (MAJOR(dev->dev) == dt->emcpower_major)
|
|
return "EMCPOWER";
|
|
|
|
@@ -319,6 +329,10 @@ int dev_is_partitioned(struct dev_types
|
|
if (!_is_partitionable(dt, dev))
|
|
return 0;
|
|
|
|
+ /* Unpartitioned DASD devices are not supported. */
|
|
+ if (MAJOR(dev->dev) == dt->dasd_major)
|
|
+ return 1;
|
|
+
|
|
return _has_partition_table(dev);
|
|
}
|
|
|
|
Index: LVM2.2.02.114/lib/device/dev-type.h
|
|
===================================================================
|
|
--- LVM2.2.02.114.orig/lib/device/dev-type.h
|
|
+++ LVM2.2.02.114/lib/device/dev-type.h
|
|
@@ -44,6 +44,7 @@ struct dev_types {
|
|
int device_mapper_major;
|
|
int emcpower_major;
|
|
int power2_major;
|
|
+ int dasd_major;
|
|
struct dev_type_def dev_type_array[NUMBER_OF_MAJORS];
|
|
};
|
|
|