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

cachevol: correcting 64b math

Widen to 64bit for correct 64b multiplication math.
This commit is contained in:
Zdenek Kabelac 2020-08-29 20:08:49 +02:00
parent f0614e7cf0
commit ef389603dd
2 changed files with 2 additions and 1 deletions

View File

@ -1,5 +1,6 @@
Version 2.03.11 - Version 2.03.11 -
================================== ==================================
Fix 64bit math when calculation cachevol size.
Preserve uint32_t for seqno handling. Preserve uint32_t for seqno handling.
Switch from mmap to plain read when loading regular files. Switch from mmap to plain read when loading regular files.
Fix missing device closing on wiping error path. Fix missing device closing on wiping error path.

View File

@ -4333,7 +4333,7 @@ static int _lv_create_cachevol(struct cmd_context *cmd,
} }
if (!cache_size_sectors) { if (!cache_size_sectors) {
pv_size_sectors = (pvl->pv->pe_count * vg->extent_size); pv_size_sectors = (pvl->pv->pe_count * (uint64_t)vg->extent_size);
if (!arg_is_set(cmd, yes_ARG) && if (!arg_is_set(cmd, yes_ARG) &&
yes_no_prompt("Use all %s from %s for cache? [y/n]: ", yes_no_prompt("Use all %s from %s for cache? [y/n]: ",