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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx
www.zte.com.cn





发件人:         Bart Van Assche <bart.vanassche@xxxxxxxxxxx>
收件人:         <zhou.guichun@xxxxxxxxxx>, Christophe Varoqui <christophe.varoqui@xxxxxxxxxxx>,
抄送:        <tang.junhui@xxxxxxxxxx>, <zhang.kai16@xxxxxxxxxx>, <dm-devel@xxxxxxxxxx>
日期:         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@xxxxxxxxxx wrote:
> From: zhouguichun <zhou.guichun@xxxxxxxxxx>
>
> 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.

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel

[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux