1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

cov: use 64bit arithmetic

Although values of VDO block_map_cache_size, index_memory_size, slab_size
should not overflow here - use proper 64bit math.
This commit is contained in:
Zdenek Kabelac 2020-06-10 23:36:06 +02:00
parent bc39d5bec6
commit dccaab3d79

View File

@ -3961,7 +3961,7 @@ static int _vdo_ ## vdo_field_name ## _disp (struct dm_report *rh, struct dm_poo
if (!seg_is_vdo_pool(seg)) \
return _field_set_value(field, "", &GET_TYPE_RESERVED_VALUE(num_undef_64)); \
\
size = seg->vdo_params.vdo_field_name ## _mb * (1024 * 1024 >> SECTOR_SHIFT); \
size = seg->vdo_params.vdo_field_name ## _mb * (UINT64_C(1024) * 1024 >> SECTOR_SHIFT); \
\
return _size64_disp(rh, mem, field, &size, private);\
}