mrc0mmand / rpms / lvm2

Forked from rpms/lvm2 2 years ago
Clone

Blame SOURCES/lvm2-2_02_183-scan-md-metadata-version-0.90-is-at-the-end-of-disk.patch

12cbd3
 lib/device/dev-md.c     | 2 +-
12cbd3
 lib/filters/filter-md.c | 6 +++---
12cbd3
 2 files changed, 4 insertions(+), 4 deletions(-)
12cbd3
12cbd3
diff --git a/lib/device/dev-md.c b/lib/device/dev-md.c
12cbd3
index 7196dc0..185499b 100644
12cbd3
--- a/lib/device/dev-md.c
12cbd3
+++ b/lib/device/dev-md.c
12cbd3
@@ -422,7 +422,7 @@ int dev_is_md_with_end_superblock(struct dev_types *dt, struct device *dev)
12cbd3
 	log_very_verbose("Device %s %s is %s.",
12cbd3
 			 dev_name(dev), attribute, version_string);
12cbd3
 
12cbd3
-	if (!strcmp(version_string, "1.0"))
12cbd3
+	if (!strcmp(version_string, "1.0") || !strcmp(version_string, "0.90"))
12cbd3
 		return 1;
12cbd3
 	return 0;
12cbd3
 }
12cbd3
diff --git a/lib/filters/filter-md.c b/lib/filters/filter-md.c
12cbd3
index e03ff50..2011e1d 100644
12cbd3
--- a/lib/filters/filter-md.c
12cbd3
+++ b/lib/filters/filter-md.c
12cbd3
@@ -47,7 +47,7 @@ extern int use_full_md_check;
12cbd3
  * 3. use udev to detect components
12cbd3
  *
12cbd3
  * mode 1 will not detect and exclude components of md devices
12cbd3
- * that use superblock version 1.0 which is at the end of the device.
12cbd3
+ * that use superblock version 0.9 or 1.0 which is at the end of the device.
12cbd3
  *
12cbd3
  * mode 2 will detect these, but mode 2 doubles the i/o done by label
12cbd3
  * scan, since there's a read at both the start and end of every device.
12cbd3
@@ -60,11 +60,11 @@ extern int use_full_md_check;
12cbd3
  *
12cbd3
  * - the command is pvcreate/vgcreate/vgextend, which format new
12cbd3
  *   devices, and if the user ran these commands on a component
12cbd3
- *   device of an md device 1.0, then it would cause problems.
12cbd3
+ *   device of an md device 0.9 or 1.0, then it would cause problems.
12cbd3
  *   FIXME: this would only really need to scan the end of the
12cbd3
  *   devices being formatted, not all devices.
12cbd3
  *
12cbd3
- * - it sees an md device on the system using version 1.0.
12cbd3
+ * - it sees an md device on the system using version 0.9 or 1.0.
12cbd3
  *   The point of this is just to avoid displaying md components
12cbd3
  *   from the 'pvs' command.
12cbd3
  *   FIXME: the cost (double i/o) may not be worth the benefit