so that there is a better code locality and also we avoid forgetting
to adapt the check for each specific draid-config parameter if a new
one gets added or an existing one changed.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
my $compression = $param->{compression} // 'on';
my $draid_config = {};
if (exists $param->{'draid-config'}) {
+ die "draid-config set without using dRAID level\n" if $raidlevel !~ m/^draid/;
$draid_config = PVE::JSONSchema::parse_property_string(
$draid_config_format, $param->{'draid-config'});
}
die "At least $draidmin disks needed for current dRAID config\n"
if $numdisks < $draidmin;
- } else {
- die "draidspares and/or draiddata set without using dRAID"
- if ($draid_spares or $draid_data);
}
my $code = sub {