[PATCH 2/4] FIX: Prevent reshape auto start during assembly for external metadata

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When md starts array and reshape position is set, md continues reshape
automatically. To prevent doing this for external metadata to allow
for later reshape configuration, clear temporary reshape_active flag
this causes that reshape parameters will not be set to array and md
will not start reshape.

Signed-off-by: Adam Kwolek <adam.kwolek@xxxxxxxxx>
---

 Assemble.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/Assemble.c b/Assemble.c
index 4d41081..bffbbf0 100644
--- a/Assemble.c
+++ b/Assemble.c
@@ -1506,15 +1506,18 @@ int assemble_container_content(struct supertype *st, int mdfd,
 	int working = 0, preexist = 0;
 	int expansion = 0;
 	struct map_ent *map = NULL;
+	int reshape_active;
 
 	sysfs_init(content, mdfd, 0);
-
+	reshape_active = content->reshape_active;
+	content->reshape_active = 0;
 	sra = sysfs_read(mdfd, 0, GET_VERSION);
 	if (sra == NULL || strcmp(sra->text_version, content->text_version) != 0)
 		if (sysfs_set_array(content, md_get_version(mdfd)) != 0) {
 			close(mdfd);
 			return 1;
 		}
+	content->reshape_active = reshape_active;
 	if (sra)
 		sysfs_free(sra);
 

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux