mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-19 14:04:17 +03:00
lvresize: fix regression with zero size arg
Commit ca878a3426197b629c76e98cfc049948da470cd7 introduced an issue that zero sized extesion suddenly started to be accepted and missed to return error. Properly check invalid input values for sizes.
This commit is contained in:
parent
172bad0d56
commit
a68e601886
@ -1,5 +1,6 @@
|
|||||||
Version 2.02.144 -
|
Version 2.02.144 -
|
||||||
=====================================
|
=====================================
|
||||||
|
Fix regresion when lvresize accepted zero sizes (2.02.141).
|
||||||
Always warn user about PV in use even when pvremove uses --force --force.
|
Always warn user about PV in use even when pvremove uses --force --force.
|
||||||
Use uninitilized pool header detection in all cases.
|
Use uninitilized pool header detection in all cases.
|
||||||
Fir read error detection when checking for uninitialized thin-pool header.
|
Fir read error detection when checking for uninitialized thin-pool header.
|
||||||
|
@ -47,6 +47,16 @@ static int _lvresize_params(struct cmd_context *cmd, int argc, char **argv,
|
|||||||
*/
|
*/
|
||||||
lp->sizeargs = arg_count(cmd, extents_ARG) + arg_count(cmd, size_ARG);
|
lp->sizeargs = arg_count(cmd, extents_ARG) + arg_count(cmd, size_ARG);
|
||||||
|
|
||||||
|
if (arg_from_list_is_zero(cmd, "may not be zero",
|
||||||
|
chunksize_ARG, extents_ARG,
|
||||||
|
poolmetadatasize_ARG,
|
||||||
|
regionsize_ARG,
|
||||||
|
size_ARG,
|
||||||
|
stripes_ARG, stripesize_ARG,
|
||||||
|
virtualsize_ARG,
|
||||||
|
-1))
|
||||||
|
return_0;
|
||||||
|
|
||||||
if (arg_count(cmd, poolmetadatasize_ARG)) {
|
if (arg_count(cmd, poolmetadatasize_ARG)) {
|
||||||
lp->poolmetadatasize = arg_uint64_value(cmd, poolmetadatasize_ARG, 0);
|
lp->poolmetadatasize = arg_uint64_value(cmd, poolmetadatasize_ARG, 0);
|
||||||
lp->poolmetadatasign = arg_sign_value(cmd, poolmetadatasize_ARG, SIGN_NONE);
|
lp->poolmetadatasign = arg_sign_value(cmd, poolmetadatasize_ARG, SIGN_NONE);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user