mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-22 17:35:59 +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;
|
||||
}
|
||||
|
||||
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) /
|
||||
|
Loading…
Reference in New Issue
Block a user