mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
cache: avoid expression overflow
Cast data_extents to 64bit so calculation is in 64b arithmetic.
This commit is contained in:
parent
e585a6bbcf
commit
48a8cf28f7
@ -1,5 +1,6 @@
|
||||
Version 2.02.107 -
|
||||
==================================
|
||||
Use proper uint64 casting for calculation of cache metadata size.
|
||||
Better support for nesting of blocking signals.
|
||||
Use only sigaction handler and drop duplicate signal handler.
|
||||
Separate signal handling and flock code out into lib/misc.
|
||||
|
@ -57,7 +57,7 @@ int update_cache_pool_params(struct volume_group *vg, unsigned attr,
|
||||
* ... plus a good amount of padding (2x) to cover any
|
||||
* policy hint data that may be added in the future.
|
||||
*/
|
||||
min_meta_size = 16 * (data_extents * vg->extent_size);
|
||||
min_meta_size = (uint64_t)data_extents * vg->extent_size * 16;
|
||||
min_meta_size /= *chunk_size; /* # of Bytes we need */
|
||||
min_meta_size *= 2; /* plus some padding */
|
||||
min_meta_size /= 512; /* in sectors */
|
||||
|
Loading…
Reference in New Issue
Block a user