dcavalca / rpms / mdadm

Forked from rpms/mdadm 3 years ago
Clone

Blame SOURCES/0017-imsm-Do-not-require-MDADM_EXPERIMENTAL-flag-anymore.patch

d922d5
From 5a5b3a6725ded07697f03ddd05ee537ce289e951 Mon Sep 17 00:00:00 2001
d922d5
From: Michal Zylowski <michal.zylowski@intel.com>
d922d5
Date: Tue, 29 May 2018 15:47:25 +0200
d922d5
Subject: [RHEL7.5 PATCH 17/26] imsm: Do not require MDADM_EXPERIMENTAL flag
d922d5
 anymore
d922d5
d922d5
Grow feature for IMSM metadata is currently fully supported and tested.
d922d5
Reshape operation is not in experimental state anymore, so usage of this
d922d5
flag is unnecessary.
d922d5
d922d5
Do not require MDADM_EXPERIMENTAL flag and remove obsolete information
d922d5
from manual.
d922d5
d922d5
Signed-off-by: Michal Zylowski <michal.zylowski@intel.com>
d922d5
Acked-by: Mariusz Dabrowski <mariusz.dabrowski@intel.com>
d922d5
Acked-by: Roman Sobanski <roman.sobanski@intel.com>
d922d5
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
d922d5
---
d922d5
 mdadm.8.in              | 24 ++++++------------------
d922d5
 mdadm.h                 |  1 -
d922d5
 super-intel.c           |  3 ---
d922d5
 tests/env-imsm-template |  1 -
d922d5
 util.c                  | 10 ----------
d922d5
 5 files changed, 6 insertions(+), 33 deletions(-)
d922d5
d922d5
diff --git a/mdadm.8.in b/mdadm.8.in
d922d5
index ea45bbc..d6bb3fa 100644
d922d5
--- a/mdadm.8.in
d922d5
+++ b/mdadm.8.in
d922d5
@@ -2718,27 +2718,15 @@ above.  Resizing arrays in an IMSM container with
d922d5
 .B "--grow --size"
d922d5
 is not yet supported.
d922d5
 
d922d5
-Grow functionality (e.g. expand a number of raid devices) for Intel's
d922d5
-IMSM container format has an experimental status. It is guarded by the
d922d5
-.B MDADM_EXPERIMENTAL
d922d5
-environment variable which must be set to '1' for a GROW command to
d922d5
-succeed.
d922d5
-This is for the following reasons:
d922d5
-
d922d5
-.IP 1.
d922d5
-Intel's native IMSM check-pointing is not fully tested yet.
d922d5
-This can causes IMSM incompatibility during the grow process: an array
d922d5
-which is growing cannot roam between Microsoft Windows(R) and Linux
d922d5
-systems.
d922d5
-
d922d5
-.IP 2.
d922d5
-Interrupting a grow operation is not recommended, because it
d922d5
-has not been fully tested for Intel's IMSM container format yet.
d922d5
-
d922d5
 .PP
d922d5
-Note: Intel's native checkpointing doesn't use
d922d5
+Notes:
d922d5
+.IP \(bu 4
d922d5
+Intel's native checkpointing doesn't use
d922d5
 .B --backup-file
d922d5
 option and it is transparent for assembly feature.
d922d5
+.IP \(bu 4
d922d5
+Roaming between Windows(R) and Linux systems for IMSM metadata is not
d922d5
+supported during grow process.
d922d5
 
d922d5
 .SS SIZE CHANGES
d922d5
 Normally when an array is built the "size" is taken from the smallest
d922d5
diff --git a/mdadm.h b/mdadm.h
d922d5
index 61bc7af..387e681 100644
d922d5
--- a/mdadm.h
d922d5
+++ b/mdadm.h
d922d5
@@ -1485,7 +1485,6 @@ extern struct mddev_ident *conf_match(struct supertype *st,
d922d5
 				      struct mdinfo *info,
d922d5
 				      char *devname,
d922d5
 				      int verbose, int *rvp);
d922d5
-extern int experimental(void);
d922d5
 
d922d5
 extern void free_line(char *line);
d922d5
 extern int match_oneof(char *devices, char *devname);
d922d5
diff --git a/super-intel.c b/super-intel.c
d922d5
index 12f60f6..a01be13 100644
d922d5
--- a/super-intel.c
d922d5
+++ b/super-intel.c
d922d5
@@ -11607,9 +11607,6 @@ static int imsm_reshape_super(struct supertype *st, unsigned long long size,
d922d5
 	dprintf("for level      : %i\n", geo.level);
d922d5
 	dprintf("for raid_disks : %i\n", geo.raid_disks);
d922d5
 
d922d5
-	if (experimental() == 0)
d922d5
-		return ret_val;
d922d5
-
d922d5
 	if (strcmp(st->container_devnm, st->devnm) == 0) {
d922d5
 		/* On container level we can only increase number of devices. */
d922d5
 		dprintf("imsm: info: Container operation\n");
d922d5
diff --git a/tests/env-imsm-template b/tests/env-imsm-template
d922d5
index bc5f585..ea45bae 100644
d922d5
--- a/tests/env-imsm-template
d922d5
+++ b/tests/env-imsm-template
d922d5
@@ -65,7 +65,6 @@ imsm_check() {
d922d5
 export IMSM_NO_PLATFORM=1
d922d5
 export IMSM_DEVNAME_AS_SERIAL=1
d922d5
 export IMSM_TEST_OROM=1
d922d5
-export MDADM_EXPERIMENTAL=1
d922d5
 container=/dev/md/container
d922d5
 member0=/dev/md/vol0
d922d5
 member1=/dev/md/vol1
d922d5
diff --git a/util.c b/util.c
d922d5
index 4adbbff..c26cf5f 100644
d922d5
--- a/util.c
d922d5
+++ b/util.c
d922d5
@@ -2149,16 +2149,6 @@ void append_metadata_update(struct supertype *st, void *buf, int len)
d922d5
 unsigned int __invalid_size_argument_for_IOC = 0;
d922d5
 #endif
d922d5
 
d922d5
-int experimental(void)
d922d5
-{
d922d5
-	if (check_env("MDADM_EXPERIMENTAL"))
d922d5
-		return 1;
d922d5
-	else {
d922d5
-		pr_err("To use this feature MDADM_EXPERIMENTAL environment variable has to be defined.\n");
d922d5
-		return 0;
d922d5
-	}
d922d5
-}
d922d5
-
d922d5
 /* Pick all spares matching given criteria from a container
d922d5
  * if min_size == 0 do not check size
d922d5
  * if domlist == NULL do not check domains
d922d5
-- 
d922d5
2.7.4
d922d5