<font size=2 face="sans-serif">Hello Bart, </font>
<br><font size=2 face="sans-serif">I agree with you that the size showed
in /sys/class/block/dm*/size is most accurate,</font>
<br><font size=2 face="sans-serif">we should use this size. But I think
once we showed the size of block device, we can't </font>
<br><font size=2 face="sans-serif">guarantee that users will not use it.
So I think the size of block device showed by </font>
<br><font size=2 face="sans-serif">multipath should not </font><tt><font size=2>greater
than the real capacity. </font></tt><font size=2>I'm looking forward to
your</font><font size=3> </font><font size=2 face="sans-serif">reply.</font>
<br>
<br><font size=2 face="sans-serif">Thanks,</font>
<br><font size=2 face="sans-serif">Zhou<br>
</font>
<br><font size=3> </font>
<p><font size=2 color=#5f5f5f face="微软雅黑">周桂春 </font><font size=2 color=#5f5f5f face="Arial">Zhou
GuiChun</font>
<p><font size=1 color=#5f5f5f face="微软雅黑">软件开发 </font><font size=1 color=#5f5f5f face="Arial">SoftWare
Development</font><font size=1 color=#5f5f5f face="微软雅黑"><br>
虚拟化长沙开发部 </font><font size=1 color=#5f5f5f face="Arial">NIV
Changsha Development Dept</font>
<p>
<table>
<tr valign=top>
<td><img src=cid:_1_0AC9BC540AC9B6EC000B63CD48258059>
<td><img src=cid:_1_0AC73FAC0AC9BE58000B63CD48258059><font size=1 color=#5f5f5f face="微软雅黑"><br>
湖南省长沙市岳麓区尖山路39号中电软件园八楼</font><font size=1 color=#5f5f5f face="Arial"><br>
</font><font size=1 color=#00a1e0 face="Arial"><br>
T</font><font size=1 color=#5f5f5f face="Arial">: +86 731-82057106
</font><font size=1 color=#00a1e0 face="Arial">M</font><font size=1 color=#5f5f5f face="Arial">:
+86 13657402573</font><font size=1 color=#00a1e0 face="Arial"><br>
E</font><font size=1 color=#5f5f5f face="Arial">: zhou.guichun@zte.com.cn</font><font size=1 color=blue face="Arial"><u><br>
</u></font><a href=http://www.zte.com.cn/><font size=1 color=#00a1e0 face="Arial"><u>www.zte.com.cn</u></font></a></table>
<br>
<br>
<br>
<br>
<br><font size=1 color=#5f5f5f face="sans-serif">发件人:
</font><font size=1 face="sans-serif">Bart Van Assche
<bart.vanassche@sandisk.com></font>
<br><font size=1 color=#5f5f5f face="sans-serif">收件人:
</font><font size=1 face="sans-serif"><zhou.guichun@zte.com.cn>,
Christophe Varoqui <christophe.varoqui@opensvc.com>, </font>
<br><font size=1 color=#5f5f5f face="sans-serif">抄送:
</font><font size=1 face="sans-serif"><tang.junhui@zte.com.cn>,
<zhang.kai16@zte.com.cn>, <dm-devel@redhat.com></font>
<br><font size=1 color=#5f5f5f face="sans-serif">日期:
</font><font size=1 face="sans-serif">2016/10/27
02:09</font>
<br><font size=1 color=#5f5f5f face="sans-serif">主题:
</font><font size=1 face="sans-serif">Re: [dm-devel]
[PATCH] libmultipath: I/O access overrun occured in mutipath device under
the displayed capacity</font>
<br>
<hr noshade>
<br>
<br>
<br><tt><font size=2>On 10/25/2016 08:18 PM, zhou.guichun@zte.com.cn wrote:<br>
> From: zhouguichun <zhou.guichun@zte.com.cn><br>
><br>
> I/O access overrun occured in mutipath device under<br>
> the displayed capacity since that the displayed<br>
> capacity is greater than the real capacity<br>
> (Eg. a 3456M disk display as 3.4G).<br>
><br>
> In this patch, we keep the displayed capacity three<br>
> decimals by abandoning the rest of decimals instead<br>
> of by rounding up(Eg. a 3.4567G disk display as<br>
> 3.456G), so that the displayed capacity will not be<br>
> greater than the real capacity, and the error will<br>
> also be in a permissible range.<br>
<br>
The motivation of this patch looks really weird to me. How could the <br>
rounding in snprint_size() cause an access past the end of a block <br>
device? Using the output of that function as block device size is wrong.
<br>
Please use /sys/class/block/dm*/size instead.<br>
<br>
Bart.<br>
</font></tt>
<br>