mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-10 16:58:47 +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 -
|
Version 2.02.107 -
|
||||||
==================================
|
==================================
|
||||||
|
Use proper uint64 casting for calculation of cache metadata size.
|
||||||
Better support for nesting of blocking signals.
|
Better support for nesting of blocking signals.
|
||||||
Use only sigaction handler and drop duplicate signal handler.
|
Use only sigaction handler and drop duplicate signal handler.
|
||||||
Separate signal handling and flock code out into lib/misc.
|
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
|
* ... plus a good amount of padding (2x) to cover any
|
||||||
* policy hint data that may be added in the future.
|
* 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 /= *chunk_size; /* # of Bytes we need */
|
||||||
min_meta_size *= 2; /* plus some padding */
|
min_meta_size *= 2; /* plus some padding */
|
||||||
min_meta_size /= 512; /* in sectors */
|
min_meta_size /= 512; /* in sectors */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user