mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-11 20:58:50 +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:
parent
e0856393c8
commit
6311be29e4
@ -3440,7 +3440,7 @@ static int _lvresize_poolmetadata(struct cmd_context *cmd, struct volume_group *
|
|||||||
extents += lv->le_count;
|
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 "
|
log_print_unless_silent("Rounding size to maximum supported size 16GiB "
|
||||||
"for metadata volume %s.", lv->name);
|
"for metadata volume %s.", lv->name);
|
||||||
extents = (DM_THIN_MAX_METADATA_SIZE + vg->extent_size - 1) /
|
extents = (DM_THIN_MAX_METADATA_SIZE + vg->extent_size - 1) /
|
||||||
|
Loading…
x
Reference in New Issue
Block a user