mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
toolib: early validation of chunk size
Since we now have validate_pool_chunk_size() we could validate entered values directly prior openning vg.
This commit is contained in:
parent
59ced3c281
commit
a0693da97f
@ -1257,6 +1257,10 @@ int get_pool_params(struct cmd_context *cmd,
|
||||
|
||||
*passed_args |= PASS_ARG_CHUNK_SIZE;
|
||||
*chunk_size = arg_uint_value(cmd, chunksize_ARG, 0);
|
||||
|
||||
if (!validate_pool_chunk_size(cmd, segtype, *chunk_size))
|
||||
return_0;
|
||||
|
||||
log_very_verbose("Setting pool chunk size: %s",
|
||||
display_size(cmd, *chunk_size));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user