[PATCH 1/9] FIX: Do not configure and start, already started reshape

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

 



When Grow_continue() calls reshape_array(), reshape is configured
and it is started with array. We cannot start reshape again,
when reshape is in progress.
/it in fact waits due to array_state == 'readonly'/

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

 Grow.c |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/Grow.c b/Grow.c
index e321a39..d25b71d 100644
--- a/Grow.c
+++ b/Grow.c
@@ -1641,6 +1641,7 @@ static int reshape_array(char *container, int fd, char *devname,
 	unsigned long long array_size;
 	int done;
 	struct mdinfo *sra = NULL;
+	int already_running;
 
 	msg = analyse_change(info, &reshape);
 	if (msg) {
@@ -1995,10 +1996,15 @@ started:
 		}
 	}
 
-	err = start_reshape(sra, (info->reshape_active && !st->ss->external));
+	already_running = info->reshape_active &&
+		restart ? restart : !st->ss->external;
+	dprintf("Reshape will be %s\n",
+		already_running ? "continued" : "started");
+	err = start_reshape(sra, already_running);
 	if (err) {
-		fprintf(stderr, Name ": Cannot start reshape for %s\n",
-			devname);
+		fprintf(stderr, Name ": Cannot %s reshape for %s\n",
+				already_running ? "continue" : "start",
+				devname);
 		goto release;
 	}
 	if (restart)

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