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

lvresize: use standard extent conversion function

We need to validate whether the requested resizing size can be
expressed with given extent_size.
This commit is contained in:
Zdenek Kabelac 2023-01-10 18:09:51 +01:00
parent bb34ebd4e4
commit f486eb60d5

View File

@ -5197,7 +5197,8 @@ static int _lvresize_adjust_size(struct volume_group *vg,
display_size(vg->cmd, size));
}
*extents = size / extent_size;
if (!(*extents = extents_from_size(vg->cmd, size, extent_size)))
return_0;
return 1;
}