use PVE::Storage::config(), not cfs_read_file()

This commit is contained in:
Fabian Grünbichler 2016-03-25 14:01:36 +01:00 committed by Dietmar Maurer
parent 8a61e0fd38
commit 20519efc76
2 changed files with 6 additions and 6 deletions

View File

@ -5321,7 +5321,7 @@ sub update_disksize {
sub rescan {
my ($vmid, $nolock) = @_;
my $cfg = PVE::Cluster::cfs_read_file("storage.cfg");
my $cfg = PVE::Storage::config();
my $volid_hash = scan_volids($cfg, $vmid);
@ -5460,7 +5460,7 @@ sub restore_vma_archive {
if !$devinfo->{$devname}->{virtdev};
}
my $cfg = cfs_read_file('storage.cfg');
my $cfg = PVE::Storage::config();
# create empty/temp config
if ($oldconf) {
@ -5585,7 +5585,7 @@ sub restore_vma_archive {
push @$vollist, $volid if $volid;
}
my $cfg = cfs_read_file('storage.cfg');
my $cfg = PVE::Storage::config();
PVE::Storage::deactivate_volumes($cfg, $vollist);
unlink $mapfifo;
@ -5630,7 +5630,7 @@ sub restore_tar_archive {
if $firstfile ne 'qemu-server.conf';
}
my $storecfg = cfs_read_file('storage.cfg');
my $storecfg = PVE::Storage::config();
# destroy existing data - keep empty config
my $vmcfgfn = PVE::QemuConfig->config_file($vmid);

View File

@ -8,7 +8,7 @@ use IO::File;
use PVE::INotify;
use PVE::JSONSchema;
use PVE::Tools;
use PVE::Cluster qw(cfs_read_file);
use PVE::Cluster;
use PVE::RPCEnvironment;
use PVE::QemuServer;
@ -160,7 +160,7 @@ sub extract_archive {
$storeid = $info->{storeid} || 'local';
}
my $cfg = cfs_read_file('storage.cfg');
my $cfg = PVE::Storage::config();
my $scfg = PVE::Storage::storage_config($cfg, $storeid);
my $alloc_size = int(($filesize + 1024 - 1)/1024);