<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:p="urn:schemas-microsoft-com:office:powerpoint" xmlns:a="urn:schemas-microsoft-com:office:access" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema" xmlns:b="urn:schemas-microsoft-com:office:publisher" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" xmlns:oa="urn:schemas-microsoft-com:office:activation" xmlns:html="http://www.w3.org/TR/REC-html40" xmlns:q="http://schemas.xmlsoap.org/soap/envelope/" xmlns:D="DAV:" xmlns:ois="http://schemas.microsoft.com/sharepoint/soap/ois/" xmlns:dir="http://schemas.microsoft.com/sharepoint/soap/directory/" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=gb2312">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><o:SmartTagType
 namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="chmetcnv"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="PersonName"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:宋体;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"\@宋体";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        text-align:justify;
        text-justify:inter-ideograph;
        font-size:10.5pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:Arial;
        color:windowtext;}
span.EmailStyle18
        {mso-style-type:personal;
        font-family:Arial;
        color:navy;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:595.3pt 841.9pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;
        layout-grid:15.6pt;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=ZH-CN link=blue vlink=purple style='text-justify-trim:punctuation'>

<div class=Section1 style='layout-grid:15.6pt'>

<p class=MsoNormal><font size=2 face="Times New Roman"><span lang=EN-US
style='font-size:10.5pt'>Hi Heinz,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face="Times New Roman"><span lang=EN-US
style='font-size:10.5pt'>       Could you please
review the following issue? <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face="Times New Roman"><span lang=EN-US
style='font-size:10.5pt'>       Looking forward
to your reply!<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face="Times New Roman"><span lang=EN-US
style='font-size:10.5pt'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 face="Times New Roman"><span lang=EN-US
style='font-size:10.5pt'>Thanks!<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face="Times New Roman"><span lang=EN-US
style='font-size:10.5pt'>conke<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 color=navy face=Arial><span lang=EN-US
style='font-size:9.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span lang=EN-US style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal align=left style='text-align:left'><b><font size=2
face=Tahoma><span lang=EN-US style='font-size:10.0pt;font-family:Tahoma;
font-weight:bold'>From:</span></font></b><font size=2 face=Tahoma><span
lang=EN-US style='font-size:10.0pt;font-family:Tahoma'> Conke Hu <br>
<b><span style='font-weight:bold'>Sent:</span></b> 2006</span></font><font
size=2 face=宋体><span style='font-size:10.0pt;font-family:宋体'>年</span></font><font
size=2 face=Tahoma><span lang=EN-US style='font-size:10.0pt;font-family:Tahoma'>9</span></font><font
size=2 face=宋体><span style='font-size:10.0pt;font-family:宋体'>月</span></font><font
size=2 face=Tahoma><span lang=EN-US style='font-size:10.0pt;font-family:Tahoma'>29</span></font><font
size=2 face=宋体><span style='font-size:10.0pt;font-family:宋体'>日</span></font><font
size=2 face=Tahoma><span lang=EN-US style='font-size:10.0pt;font-family:Tahoma'>
20:38<br>
<b><span style='font-weight:bold'>To:</span></b> '<st1:PersonName w:st="on">Mauelshagen@RedHat.com</st1:PersonName>'<br>
<b><span style='font-weight:bold'>Cc:</span></b> '<st1:PersonName w:st="on">g.hoogewerf@gmail.com</st1:PersonName>'<br>
<b><span style='font-weight:bold'>Subject:</span></b> a dmraid bug on Promise
RAID</span></font><font size=3><span lang=EN-US style='font-size:12.0pt'><o:p></o:p></span></font></p>

</div>

<p class=MsoNormal align=left style='text-align:left'><font size=2
face="Times New Roman"><span lang=EN-US style='font-size:10.5pt'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 color="#333399" face=Arial><span lang=EN-US
style='font-size:10.5pt;font-family:Arial;color:#333399'>Hi,<o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;text-autospace:none'><font
size=2 color="#333399" face=Arial><span lang=EN-US style='font-size:10.5pt;
font-family:Arial;color:#333399'>       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.<o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left;text-autospace:none'><font
size=2 color="#333399" face=Arial><span lang=EN-US style='font-size:10.5pt;
font-family:Arial;color:#333399'>       We’ve
found the root cause. Firstly let’s take a look at struct pdc:<o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:42.0pt;mso-para-margin-left:4.0gd'><font
size=2 color=green face=Arial><span lang=EN-US style='font-size:10.5pt;
font-family:Arial;color:green'>       struct pdc
{<o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='margin-left:52.5pt;mso-para-margin-left:
5.0gd;text-align:left'><font size=2 color=green face=Arial><span lang=EN-US
style='font-size:10.5pt;font-family:Arial;color:green'>      
uint8_t promise_id[PDC_ID_LENGTH];   /* 0x00 - 0x17 */<o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='margin-left:52.5pt;mso-para-margin-left:
5.0gd;text-align:left'><font size=2 color=green face=Arial><span lang=EN-US
style='font-size:10.5pt;font-family:Arial;color:green'>      
uint32_t
unknown_0;               
/* 0x18 - 0x1B */<o:p></o:p></span></font></p>

<p class=MsoNormal align=left style='margin-left:52.5pt;mso-para-margin-left:
5.0gd;text-align:left'><font size=2 color=green face=Arial><span lang=EN-US
style='font-size:10.5pt;font-family:Arial;color:green'>      
uint32_t
magic_0;                    
/* 0x<st1:chmetcnv UnitName="C" SourceValue="1" HasSpace="False"
Negative="False" NumberType="1" TCSC="0" w:st="on">1C</st1:chmetcnv> - 0x<st1:chmetcnv
UnitName="F" SourceValue="1" HasSpace="False" Negative="False" NumberType="1"
TCSC="0" w:st="on">1F</st1:chmetcnv> */<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color="#333399" face=Arial><span lang=EN-US
style='font-size:10.5pt;font-family:Arial;color:#333399'>      
According to the Promise engineer, <b><u><span style='font-weight:bold'>the
value set at offset 0x1C is not a magic number, but records the RAID engine
version</span></u></b>. So when dmraid executes the following code
(lib/format/ataraid/pdc.c):<o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:52.5pt;mso-para-margin-left:5.0gd'><font
size=2 color=green face=Arial><span lang=EN-US style='font-size:10.5pt;
font-family:Arial;color:green'>    if (pdc->magic_0 ==
pdc->raid.magic_0 &&<o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:52.5pt;mso-para-margin-left:5.0gd'><font
size=2 color=green face=Arial><span lang=EN-US style='font-size:10.5pt;
font-family:Arial;color:green'>           
pdc->raid.total_disks &&<o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:52.5pt;mso-para-margin-left:5.0gd'><font
size=2 color=green face=Arial><span lang=EN-US style='font-size:10.5pt;
font-family:Arial;color:green'>           
pdc->raid.total_disks < PDC_MAXDISKS)<o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:52.5pt;mso-para-margin-left:5.0gd'><font
size=2 color=green face=Arial><span lang=EN-US style='font-size:10.5pt;
font-family:Arial;color:green'>               
return 1;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=green face=Arial><span lang=EN-US
style='font-size:10.5pt;font-family:Arial;color:green'>      
</span></font><font color=navy face=Arial><span lang=EN-US style='font-family:
Arial;color:navy'>it always returns 1 since pdc->magic_0 never equals
pdc->raid.magic_0 ! <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-US
style='font-size:10.5pt;font-family:Arial;color:navy'>      
<b><u><span style='font-weight:bold'>To fix this bug, dmraid source code only
needs to ignore checking magic_0</span></u></b>, modified to t</span></font><font
color="#003366" face=Arial><span lang=EN-US style='font-family:Arial;
color:#003366'>he following:<o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:42.0pt;mso-para-margin-left:4.0gd'><font
size=2 color=green face=Arial><span lang=EN-US style='font-size:10.5pt;
font-family:Arial;color:green'>       if (
pdc->raid.total_disks &&<o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:42.0pt;mso-para-margin-left:4.0gd'><font
size=2 color=green face=Arial><span lang=EN-US style='font-size:10.5pt;
font-family:Arial;color:green'>           
pdc->raid.total_disks < PDC_MAXDISKS)<o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:42.0pt;mso-para-margin-left:4.0gd'><font
size=2 color=green face=Arial><span lang=EN-US style='font-size:10.5pt;
font-family:Arial;color:green'>               
return 1;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-US
style='font-size:10.5pt;font-family:Arial;color:navy'>      
I have tested this modification and it is safe to delete “pdc->magic_0 ==
pdc->raid.magic_0”.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-US
style='font-size:10.5pt;font-family:Arial;color:navy'>      
Could you please do this change in next dmraid version?<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-US
style='font-size:10.5pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-US
style='font-size:10.5pt;font-family:Arial;color:navy'>Thanks!<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-US
style='font-size:10.5pt;font-family:Arial;color:navy'>Conke<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-US
style='font-size:10.5pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>

</div>

</body>

</html>