FIX: Make expansion counter usable
Currently whole array geometry is set in sysfs_set_array(), so none of disks (even for expansion) should fail during sysfs_add_disk() Due to this expansion counter should be used for reshaped array when disk slot is bigger than number of disks in array. Signed-off-by: Adam Kwolek <adam.kwolek@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
parent
b8063f0770
commit
1403201652
13
Assemble.c
13
Assemble.c
|
@ -1526,13 +1526,14 @@ int assemble_container_content(struct supertype *st, int mdfd,
|
||||||
sysfs_free(sra);
|
sysfs_free(sra);
|
||||||
|
|
||||||
for (dev = content->devs; dev; dev = dev->next)
|
for (dev = content->devs; dev; dev = dev->next)
|
||||||
if (sysfs_add_disk(content, dev, 1) == 0)
|
if (sysfs_add_disk(content, dev, 1) == 0) {
|
||||||
working++;
|
if (dev->disk.raid_disk >= content->array.raid_disks &&
|
||||||
else if (errno == EEXIST)
|
content->reshape_active)
|
||||||
|
expansion++;
|
||||||
|
else
|
||||||
|
working++;
|
||||||
|
} else if (errno == EEXIST)
|
||||||
preexist++;
|
preexist++;
|
||||||
else if (dev->disk.raid_disk >= content->array.raid_disks &&
|
|
||||||
content->reshape_active)
|
|
||||||
expansion++;
|
|
||||||
if (working == 0)
|
if (working == 0)
|
||||||
return 1;/* Nothing new, don't try to start */
|
return 1;/* Nothing new, don't try to start */
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue