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