mirror of
https://git.proxmox.com/git/grub2
synced 2025-07-27 10:08:18 +00:00
* disk/mdraid_linux.c (grub_mdraid_detect): Fix calculation of 1.x
chunk size and disk size, which are already given as sector counts as distinct from the 0.90 units. Fetch the correct device number from the role table instead of using the table index.
This commit is contained in:
parent
a9eff6b400
commit
3b97788878
@ -1,3 +1,10 @@
|
||||
2009-12-15 Peter Henn <peter.henn@web.de>
|
||||
|
||||
* disk/mdraid_linux.c (grub_mdraid_detect): Fix calculation of 1.x
|
||||
chunk size and disk size, which are already given as sector counts
|
||||
as distinct from the 0.90 units. Fetch the correct device number
|
||||
from the role table instead of using the table index.
|
||||
|
||||
2009-11-16 Felix Zielcke <fzielcke@z-51.de>
|
||||
|
||||
* disk/mdraid_linux.c (grub_mdraid_detect): Remove a wrong call
|
||||
|
@ -371,9 +371,12 @@ superblock_0_90:
|
||||
array->level = grub_le_to_cpu32 (sb_1x->level);
|
||||
array->layout = grub_le_to_cpu32 (sb_1x->layout);
|
||||
array->total_devs = grub_le_to_cpu32 (sb_1x->raid_disks);
|
||||
array->disk_size = grub_le_to_cpu64 (sb_1x->size) * 2;
|
||||
array->disk_size = grub_le_to_cpu64 (sb_1x->size);
|
||||
array->chunk_size = grub_le_to_cpu32 (sb_1x->chunksize);
|
||||
array->index = grub_le_to_cpu32 (sb_1x->dev_number);
|
||||
if (grub_le_to_cpu32 (sb_1x->dev_number) < grub_le_to_cpu32 (sb_1x->max_dev))
|
||||
array->index = grub_le_to_cpu16 (sb_1x->dev_roles[grub_le_to_cpu32 (sb_1x->dev_number)]);
|
||||
else
|
||||
array->index = 0xffff; /* disk will be later not used! */
|
||||
array->uuid_len = 16;
|
||||
array->uuid = grub_malloc (16);
|
||||
if (!array->uuid)
|
||||
|
Loading…
Reference in New Issue
Block a user