mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +03:00
cleanup: uint64_t casts
This commit is contained in:
parent
ff86c6ed00
commit
bd67a3151a
@ -335,7 +335,7 @@ static void __update_lvmcache(const struct format_type *fmt,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
lvmcache_set_device_size(info, xlate32(dl->pvd.pv_size) << SECTOR_SHIFT);
|
lvmcache_set_device_size(info, ((uint64_t)xlate32(dl->pvd.pv_size)) << SECTOR_SHIFT);
|
||||||
lvmcache_del_mdas(info);
|
lvmcache_del_mdas(info);
|
||||||
lvmcache_make_valid(info);
|
lvmcache_make_valid(info);
|
||||||
}
|
}
|
||||||
|
@ -153,7 +153,7 @@ int calculate_extent_count(struct physical_volume *pv, uint32_t extent_size,
|
|||||||
|
|
||||||
pvd->pe_start = _round_up(end, LVM1_PE_ALIGN);
|
pvd->pe_start = _round_up(end, LVM1_PE_ALIGN);
|
||||||
|
|
||||||
} while ((pvd->pe_start + (pvd->pe_total * extent_size))
|
} while ((pvd->pe_start + ((uint64_t)pvd->pe_total * extent_size))
|
||||||
> pv->size);
|
> pv->size);
|
||||||
|
|
||||||
if (pvd->pe_total > MAX_PE_TOTAL) {
|
if (pvd->pe_total > MAX_PE_TOTAL) {
|
||||||
|
@ -79,7 +79,7 @@ static int _lvm1_read(struct labeller *l, struct device *dev, void *buf,
|
|||||||
return_0;
|
return_0;
|
||||||
*label = lvmcache_get_label(info);
|
*label = lvmcache_get_label(info);
|
||||||
|
|
||||||
lvmcache_set_device_size(info, xlate32(pvd->pv_size) << SECTOR_SHIFT);
|
lvmcache_set_device_size(info, ((uint64_t)xlate32(pvd->pv_size)) << SECTOR_SHIFT);
|
||||||
lvmcache_del_mdas(info);
|
lvmcache_del_mdas(info);
|
||||||
lvmcache_make_valid(info);
|
lvmcache_make_valid(info);
|
||||||
|
|
||||||
|
@ -103,7 +103,7 @@ int read_pool_label(struct pool_list *pl, struct labeller *l,
|
|||||||
if (label)
|
if (label)
|
||||||
*label = lvmcache_get_label(info);
|
*label = lvmcache_get_label(info);
|
||||||
|
|
||||||
lvmcache_set_device_size(info, xlate32_be(pd->pl_blocks) << SECTOR_SHIFT);
|
lvmcache_set_device_size(info, ((uint64_t)xlate32_be(pd->pl_blocks)) << SECTOR_SHIFT);
|
||||||
lvmcache_del_mdas(info);
|
lvmcache_del_mdas(info);
|
||||||
lvmcache_make_valid(info);
|
lvmcache_make_valid(info);
|
||||||
|
|
||||||
|
@ -726,7 +726,7 @@ static uint32_t mirror_log_extents(uint32_t region_size, uint32_t pe_size, uint3
|
|||||||
{
|
{
|
||||||
size_t area_size, bitset_size, log_size, region_count;
|
size_t area_size, bitset_size, log_size, region_count;
|
||||||
|
|
||||||
area_size = area_len * pe_size;
|
area_size = (size_t)area_len * pe_size;
|
||||||
region_count = dm_div_up(area_size, region_size);
|
region_count = dm_div_up(area_size, region_size);
|
||||||
|
|
||||||
/* Work out how many "unsigned long"s we need to hold the bitset. */
|
/* Work out how many "unsigned long"s we need to hold the bitset. */
|
||||||
|
@ -54,7 +54,7 @@ static int _pvdisplay_single(struct cmd_context *cmd,
|
|||||||
if (is_orphan(pv))
|
if (is_orphan(pv))
|
||||||
size = pv_size(pv);
|
size = pv_size(pv);
|
||||||
else
|
else
|
||||||
size = (pv_pe_count(pv) - pv_pe_alloc_count(pv)) *
|
size = (uint64_t)(pv_pe_count(pv) - pv_pe_alloc_count(pv)) *
|
||||||
pv_pe_size(pv);
|
pv_pe_size(pv);
|
||||||
|
|
||||||
if (arg_count(cmd, short_ARG)) {
|
if (arg_count(cmd, short_ARG)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user