[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] bug fix for raid code
From: |
Bean |
Subject: |
[PATCH] bug fix for raid code |
Date: |
Sun, 10 Aug 2008 00:32:33 +0800 |
Hi,
This patch fix an issue in raid0. mdadm set the disk size field in
super block to 0 for raid0, so the size of device (md0) will be 0.
This patch fix this by calculating the size of (md0) when
array->disk_size is 0.
Another problem is actually caused by qemu, but as it's the main
testing platform, I add it here as well. For cdrom drive, the size is
not accurate. When raid.c scans a cdrom drive, it read beyond the cd
limit, which cause qemu to halt. This patch add a field size_invalid
in the disk structure, and raid use this to avoid scanning cdrom
drives.
2008-08-09 Bean <address@hidden>
* disk/i386/pc/biodisk.c (grub_biosdisk_open): Set size_invalid for
cdrom drive.
* disk.raid.c (grub_raid_open): Calculte the raid0 disk size if
array->disk_size is 0.
(grub_raid_scan_device): Skip drive where size_invalid is set.
* include/grub/disk.h (grub_disk): New field size_invalid.
* kern/disk.c (grub_disk_open): Initialize field size_invalid to 0.
--
Bean
raid.diff
Description: Text Data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] bug fix for raid code,
Bean <=