a dmraid bug on Promise RAID (urgent!)
Conke Hu
chu at ati.com
Tue Oct 17 03:03:26 UTC 2006
Hi Heinz,
Could you please review the following issue?
Looking forward to your reply!
Thanks!
conke
________________________________
From: Conke Hu
Sent: 2006年9月29日 20:38
To: 'Mauelshagen at RedHat.com'
Cc: 'g.hoogewerf at gmail.com'
Subject: a dmraid bug on Promise RAID
Hi,
There is bug in pdc.c (lib/format/ataraid/pdc.c). when you activate the promise software RAID, you will get the error messages shown in the attached screenshot.
We’ve found the root cause. Firstly let’s take a look at struct pdc:
struct pdc {
uint8_t promise_id[PDC_ID_LENGTH]; /* 0x00 - 0x17 */
uint32_t unknown_0; /* 0x18 - 0x1B */
uint32_t magic_0; /* 0x1C - 0x1F */
According to the Promise engineer, the value set at offset 0x1C is not a magic number, but records the RAID engine version. So when dmraid executes the following code (lib/format/ataraid/pdc.c):
if (pdc->magic_0 == pdc->raid.magic_0 &&
pdc->raid.total_disks &&
pdc->raid.total_disks < PDC_MAXDISKS)
return 1;
it always returns 1 since pdc->magic_0 never equals pdc->raid.magic_0 !
To fix this bug, dmraid source code only needs to ignore checking magic_0, modified to the following:
if ( pdc->raid.total_disks &&
pdc->raid.total_disks < PDC_MAXDISKS)
return 1;
I have tested this modification and it is safe to delete “pdc->magic_0 == pdc->raid.magic_0”.
Could you please do this change in next dmraid version?
Thanks!
Conke
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/ataraid-list/attachments/20061017/263881c0/attachment.htm>
More information about the Ataraid-list
mailing list