allow to set option 'maxfiles'
This commit is contained in:
2
Makefile
2
Makefile
@ -2,7 +2,7 @@ RELEASE=2.0
|
|||||||
|
|
||||||
VERSION=2.0
|
VERSION=2.0
|
||||||
PACKAGE=libpve-storage-perl
|
PACKAGE=libpve-storage-perl
|
||||||
PKGREL=14
|
PKGREL=15
|
||||||
|
|
||||||
DESTDIR=
|
DESTDIR=
|
||||||
PREFIX=/usr
|
PREFIX=/usr
|
||||||
|
|||||||
@ -168,6 +168,11 @@ __PACKAGE__->register_method ({
|
|||||||
type => 'boolean',
|
type => 'boolean',
|
||||||
optional => 1,
|
optional => 1,
|
||||||
},
|
},
|
||||||
|
maxfiles => {
|
||||||
|
type => 'integer',
|
||||||
|
optional => 1,
|
||||||
|
minimum => 0,
|
||||||
|
},
|
||||||
shared => {
|
shared => {
|
||||||
type => 'boolean',
|
type => 'boolean',
|
||||||
optional => 1,
|
optional => 1,
|
||||||
@ -270,6 +275,11 @@ __PACKAGE__->register_method ({
|
|||||||
type => 'string', format => 'pve-storage-options',
|
type => 'string', format => 'pve-storage-options',
|
||||||
optional => 1,
|
optional => 1,
|
||||||
},
|
},
|
||||||
|
maxfiles => {
|
||||||
|
type => 'integer',
|
||||||
|
optional => 1,
|
||||||
|
minimum => 0,
|
||||||
|
},
|
||||||
digest => {
|
digest => {
|
||||||
type => 'string',
|
type => 'string',
|
||||||
description => 'Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.',
|
description => 'Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.',
|
||||||
|
|||||||
@ -149,6 +149,7 @@ my $confvars = {
|
|||||||
target => 'target',
|
target => 'target',
|
||||||
nodes => 'nodes',
|
nodes => 'nodes',
|
||||||
options => 'options',
|
options => 'options',
|
||||||
|
maxfiles => 'natural',
|
||||||
};
|
};
|
||||||
|
|
||||||
my $required_config = {
|
my $required_config = {
|
||||||
@ -171,6 +172,7 @@ my $default_config = {
|
|||||||
nodes => 0,
|
nodes => 0,
|
||||||
shared => 0,
|
shared => 0,
|
||||||
disable => 0,
|
disable => 0,
|
||||||
|
maxfiles => 0,
|
||||||
content => [ { images => 1, rootdir => 1, vztmpl => 1, iso => 1, backup => 1, none => 1 },
|
content => [ { images => 1, rootdir => 1, vztmpl => 1, iso => 1, backup => 1, none => 1 },
|
||||||
{ images => 1, rootdir => 1 }],
|
{ images => 1, rootdir => 1 }],
|
||||||
format => [ { raw => 1, qcow2 => 1, vmdk => 1 } , 'raw' ],
|
format => [ { raw => 1, qcow2 => 1, vmdk => 1 } , 'raw' ],
|
||||||
@ -183,6 +185,7 @@ my $default_config = {
|
|||||||
server => 1,
|
server => 1,
|
||||||
export => 1,
|
export => 1,
|
||||||
options => 0,
|
options => 0,
|
||||||
|
maxfiles => 0,
|
||||||
content => [ { images => 1, rootdir => 1, vztmpl => 1, iso => 1, backup => 1},
|
content => [ { images => 1, rootdir => 1, vztmpl => 1, iso => 1, backup => 1},
|
||||||
{ images => 1 }],
|
{ images => 1 }],
|
||||||
format => [ { raw => 1, qcow2 => 1, vmdk => 1 } , 'raw' ],
|
format => [ { raw => 1, qcow2 => 1, vmdk => 1 } , 'raw' ],
|
||||||
@ -357,6 +360,10 @@ sub check_type {
|
|||||||
return parse_lvm_name ($value, $noerr);
|
return parse_lvm_name ($value, $noerr);
|
||||||
} elsif ($ct eq 'portal') {
|
} elsif ($ct eq 'portal') {
|
||||||
return verify_portal($value, $noerr);
|
return verify_portal($value, $noerr);
|
||||||
|
} elsif ($ct eq 'natural') {
|
||||||
|
return int($value) if $value =~ m/^\d+$/;
|
||||||
|
return undef if $noerr;
|
||||||
|
die "type check ('natural') failed - got '$value'\n";
|
||||||
} elsif ($ct eq 'nodes') {
|
} elsif ($ct eq 'nodes') {
|
||||||
my $res = {};
|
my $res = {};
|
||||||
|
|
||||||
@ -711,10 +718,10 @@ sub write_config {
|
|||||||
|
|
||||||
foreach my $k (keys %$def) {
|
foreach my $k (keys %$def) {
|
||||||
next if defined ($done_hash->{$k});
|
next if defined ($done_hash->{$k});
|
||||||
if (defined (my $v = $ids->{$storeid}->{$k})) {
|
my $v = $ids->{$storeid}->{$k};
|
||||||
|
next if !defined($v);
|
||||||
$data .= sprint_config_line ($k, $v);
|
$data .= sprint_config_line ($k, $v);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
$out .= "$data\n";
|
$out .= "$data\n";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,3 +1,9 @@
|
|||||||
|
libpve-storage-perl (2.0-15) unstable; urgency=low
|
||||||
|
|
||||||
|
* allow to set option 'maxfiles' (we will use this for vzdump)
|
||||||
|
|
||||||
|
-- Proxmox Support Team <support@proxmox.com> Wed, 21 Mar 2012 07:16:17 +0100
|
||||||
|
|
||||||
libpve-storage-perl (2.0-14) unstable; urgency=low
|
libpve-storage-perl (2.0-14) unstable; urgency=low
|
||||||
|
|
||||||
* use Digest::SHA instead of Digest::SHA1
|
* use Digest::SHA instead of Digest::SHA1
|
||||||
|
|||||||
Reference in New Issue
Block a user