Skip to contentSkip to conversation

Incremental: don't try to load_container() for a subarray

PATCH Applied Artur Paszkiewicz 2 participants 2 messages Aug 9, 2016 MD RAID

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Incremental: don't try to load_container() for a subarray

mdadm -IRs would exit with a non-zero status because of this.

---
 Incremental.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
Incremental.c +5 -1
index ba97b00..cc01d41 100644
@@ -1347,8 +1347,12 @@ restart:
 
 		if (devnm && strcmp(devnm, me->devnm) != 0)
 			continue;
-		if (devnm && me->metadata[0] == '/') {
+		if (me->metadata[0] == '/') {
 			char *sl;
+
+			if (!devnm)
+				continue;
+
 			/* member array, need to work on container */
 			strncpy(container, me->metadata+1, 32);
 			container[31] = 0;
Signature · 1 line
2.9.2
Applied
#1 lore raw
Quoted 7 lines · Artur Paszkiewicz

mdadm -IRs would exit with a non-zero status because of this.

---
 Incremental.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Applied!

Thanks,
Jes

Quoted 18 lines
Incremental.c +5 -1
index ba97b00..cc01d41 100644
@@ -1347,8 +1347,12 @@ restart:
 
 		if (devnm && strcmp(devnm, me->devnm) != 0)
 			continue;
-		if (devnm && me->metadata[0] == '/') {
+		if (me->metadata[0] == '/') {
 			char *sl;
+
+			if (!devnm)
+				continue;
+
 			/* member array, need to work on container */
 			strncpy(container, me->metadata+1, 32);
 			container[31] = 0;