[PATCH 14/34] FIX: change adding disks criteria

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

 



Some of disks tried to add are array member already.
New disks should be added only.

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

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

diff --git a/Grow.c b/Grow.c
index 6dbc3b7..9801a45 100644
--- a/Grow.c
+++ b/Grow.c
@@ -1696,8 +1696,8 @@ static int reshape_array(char *container, int fd, char *devname,
 
 		if (info2)
 			for (d = info2->devs; d; d = d->next) {
-				if (d->disk.state == 0 &&
-				    d->disk.raid_disk >= 0) {
+				if (d->disk.raid_disk >=
+				    reshape.before.raid_disks) {
 					/* This is a spare that wants to
 					 * be part of the array.
 					 */

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