Don't set was_readable for new array
This commit is contained in:
parent
716aa45e40
commit
b094f07c23
1 changed files with 8 additions and 9 deletions
|
@ -637,6 +637,7 @@ insert_array (grub_disk_t disk, struct grub_raid_array *new_array,
|
||||||
grub_raid_t raid __attribute__ ((unused)))
|
grub_raid_t raid __attribute__ ((unused)))
|
||||||
{
|
{
|
||||||
struct grub_raid_array *array = 0, *p;
|
struct grub_raid_array *array = 0, *p;
|
||||||
|
int was_readable = 0;
|
||||||
|
|
||||||
/* See whether the device is part of an array we have already seen a
|
/* See whether the device is part of an array we have already seen a
|
||||||
device from. */
|
device from. */
|
||||||
|
@ -647,6 +648,8 @@ insert_array (grub_disk_t disk, struct grub_raid_array *new_array,
|
||||||
grub_free (new_array->uuid);
|
grub_free (new_array->uuid);
|
||||||
array = p;
|
array = p;
|
||||||
|
|
||||||
|
was_readable = grub_is_array_readable (array);
|
||||||
|
|
||||||
/* Do some checks before adding the device to the array. */
|
/* Do some checks before adding the device to the array. */
|
||||||
|
|
||||||
if (new_array->index >= array->allocated_devs)
|
if (new_array->index >= array->allocated_devs)
|
||||||
|
@ -803,15 +806,11 @@ insert_array (grub_disk_t disk, struct grub_raid_array *new_array,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Add the device to the array. */
|
/* Add the device to the array. */
|
||||||
{
|
array->members[new_array->index].device = disk;
|
||||||
int was_readable = grub_is_array_readable (array);
|
array->members[new_array->index].start_sector = start_sector;
|
||||||
|
array->nr_devs++;
|
||||||
array->members[new_array->index].device = disk;
|
if (!was_readable && grub_is_array_readable (array))
|
||||||
array->members[new_array->index].start_sector = start_sector;
|
array->became_readable_at = inscnt++;
|
||||||
array->nr_devs++;
|
|
||||||
if (!was_readable && grub_is_array_readable (array))
|
|
||||||
array->became_readable_at = inscnt++;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue