[PATCH 12/12] FIX: Do not try to (continue) reshape using inactive array

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

 



When one of arrays is inactive, do not try to continue reshape
on this array. Just skip it.

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

 Grow.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/Grow.c b/Grow.c
index 553a49e..e295a5f 100644
--- a/Grow.c
+++ b/Grow.c
@@ -2626,6 +2626,13 @@ int reshape_container(char *container, char *devname,
 						  devname2devnum(container));
 			if (!mdstat)
 				continue;
+			if (mdstat->active == 0) {
+				fprintf(stderr, Name ": Skipping inactive "
+					"array md%i.\n", mdstat->devnum);
+				free_mdstat(mdstat);
+				mdstat = NULL;
+				continue;
+			}
 			break;
 		}
 		if (!content)
@@ -3922,6 +3929,13 @@ int Grow_continue_command(char *devname, int fd,
 			mdstat = mdstat_by_subdev(array, container_dev);
 			if (!mdstat)
 				continue;
+			if (mdstat->active == 0) {
+				fprintf(stderr, Name ": Skipping inactive "
+					"array md%i.\n", mdstat->devnum);
+				free_mdstat(mdstat);
+				mdstat = NULL;
+				continue;
+			}
 			break;
 		}
 		if (!content) {

--
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