[PATCH 5/6] FIX: Container can be left frozen

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

 



When container operation fails before child process starts,
array can be left frozen because container_reshape() doesn't make
unfreeze() operation in all error cases, as it is responsible for.

add unfreeze() operation for error case scenarios in reshape_container()

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

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

diff --git a/Grow.c b/Grow.c
index 09d7439..e77ab80 100644
--- a/Grow.c
+++ b/Grow.c
@@ -2123,8 +2123,10 @@ int reshape_container(char *container, int cfd, char *devname,
 	if (reshape_super(st, -1, info->new_level,
 			  info->new_layout, info->new_chunk,
 			  info->array.raid_disks + info->delta_disks,
-			  backup_file, devname, quiet))
+			  backup_file, devname, quiet)) {
+		unfreeze(st);
 		return 1;
+	}
 
 	sync_metadata(st);
 
@@ -2135,6 +2137,7 @@ int reshape_container(char *container, int cfd, char *devname,
 	switch (fork()) {
 	case -1: /* error */
 		perror("Cannot fork to complete reshape\n");
+		unfreeze(st);
 		return 1;
 	default: /* parent */
 		printf(Name ": multi-array reshape continues in background\n");

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