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@xxxxxxxxxx'
Cc: 'g.hoogewerf@xxxxxxxxx'
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