* grub-core/disk/mdraid1x_linux.c (grub_mdraid_detect): Do not put

elements with invlid index.
	* grub-core/disk/mdraid_linux.c (grub_mdraid_detect): Likewise.
	* grub-core/disk/raid.c (insert_array): Automatically reallocate
	members.
	* include/grub/raid.h (grub_raid_member): New struct.
	(grub_raid_array): Transform devices and start_sector into usage of
	grub_raid_member. All users updated
	(allocated_devs): New member.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-11-01 10:20:58 +01:00
parent 71574288a4
commit 3a1197cdb0
7 changed files with 88 additions and 38 deletions

View file

@ -45,7 +45,7 @@ grub_raid5_recover (struct grub_raid_array *array, int disknr,
if (i == disknr)
continue;
err = grub_disk_read (array->device[i], sector, 0, size, buf2);
err = grub_disk_read (array->members[i].device, sector, 0, size, buf2);
if (err)
{