[PATCH] Grow: goto release if Manage_subdevs failed

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

 



If failure happened when add disk to array
by grow mode, need to goto release instead
of continue the reshape.

Signed-off-by: Guoqing Jiang <gqjiang@xxxxxxxx>
---
 Grow.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/Grow.c b/Grow.c
index cf2750a..1767a1e 100755
--- a/Grow.c
+++ b/Grow.c
@@ -3003,8 +3003,9 @@ static int reshape_array(char *container, int fd, char *devname,
 	 * level and frozen, we can safely add them.
 	 */
 	if (devlist)
-		Manage_subdevs(devname, fd, devlist, verbose,
-			       0,NULL, 0);
+		if (Manage_subdevs(devname, fd, devlist, verbose,
+				   0,NULL, 0))
+			goto release;
 
 	if (reshape.backup_blocks == 0 && data_offset != INVALID_SECTORS)
 		reshape.backup_blocks = reshape.before.data_disks * info->array.chunk_size/512;
-- 
2.6.2

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