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

thin: use 64bit arithmetic for checking meta size

Avoid overflow since extents are just 32bit values.

(in release fix 87aca628)
This commit is contained in:
Zdenek Kabelac 2013-07-23 10:46:50 +02:00
parent e0856393c8
commit 6311be29e4

View File

@ -3440,7 +3440,7 @@ static int _lvresize_poolmetadata(struct cmd_context *cmd, struct volume_group *
extents += lv->le_count;
}
if (extents * vg->extent_size > DM_THIN_MAX_METADATA_SIZE) {
if ((uint64_t)extents * vg->extent_size > DM_THIN_MAX_METADATA_SIZE) {
log_print_unless_silent("Rounding size to maximum supported size 16GiB "
"for metadata volume %s.", lv->name);
extents = (DM_THIN_MAX_METADATA_SIZE + vg->extent_size - 1) /