[dm-devel] [PATCH] libmultipath: I/O access overrun occured in mutipath device under the displayed capacity

zhou.guichun at zte.com.cn zhou.guichun at zte.com.cn
Thu Oct 27 02:04:09 UTC 2016


Hello Bart, 
I agree with you that the size showed in /sys/class/block/dm*/size is most 
accurate,
we should use this size. But I think once we showed the size of block 
device, we can't 
guarantee that users will not use it. So I think the size of block device 
showed by 
multipath should not greater than the real capacity. I'm looking forward 
to your reply.

Thanks,
Zhou

 
周桂春  Zhou GuiChun
软件开发  SoftWare Development
虚拟化长沙开发部  NIV Changsha Development Dept



湖南省长沙市岳麓区尖山路39号中电软件园八楼

T: +86 731-82057106    M: +86 13657402573
E: zhou.guichun at zte.com.cn
www.zte.com.cn




发件人:         Bart Van Assche <bart.vanassche at sandisk.com>
收件人:         <zhou.guichun at zte.com.cn>, Christophe Varoqui 
<christophe.varoqui at opensvc.com>, 
抄送:   <tang.junhui at zte.com.cn>, <zhang.kai16 at zte.com.cn>, 
<dm-devel at redhat.com>
日期:   2016/10/27 02:09
主题:   Re: [dm-devel] [PATCH] libmultipath: I/O access overrun occured in 
mutipath device under the displayed capacity



On 10/25/2016 08:18 PM, zhou.guichun at zte.com.cn wrote:
> From: zhouguichun <zhou.guichun at zte.com.cn>
>
> I/O access overrun occured in mutipath device under
> the displayed capacity since that the displayed
> capacity is greater than the real capacity
> (Eg. a 3456M disk display as 3.4G).
>
> In this patch, we keep the displayed capacity three
> decimals by abandoning the rest of decimals instead
> of by rounding up(Eg. a 3.4567G disk display as
> 3.456G), so that the displayed capacity will not be
> greater than the real capacity, and the error will
> also be in a permissible range.

The motivation of this patch looks really weird to me. How could the 
rounding in snprint_size() cause an access past the end of a block 
device? Using the output of that function as block device size is wrong. 
Please use /sys/class/block/dm*/size instead.

Bart.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/dm-devel/attachments/20161027/30044b6f/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 6015 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/dm-devel/attachments/20161027/30044b6f/attachment.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 2054 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/dm-devel/attachments/20161027/30044b6f/attachment-0001.gif>


More information about the dm-devel mailing list