[pve-devel] [PATCH qemu-server 3/4] rename foreach_writable_storage to foreach_storage_used_by_vm

Fabian Grünbichler f.gruenbichler at proxmox.com
Wed May 10 12:00:20 CEST 2017


Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
---
Note: this is not used anywhere else, so it might make sense to move it to
QemuConfig and/or make it private?

 PVE/QemuConfig.pm | 4 ++--
 PVE/QemuServer.pm | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/PVE/QemuConfig.pm b/PVE/QemuConfig.pm
index 1492480..bc918a2 100644
--- a/PVE/QemuConfig.pm
+++ b/PVE/QemuConfig.pm
@@ -112,7 +112,7 @@ sub __snapshot_save_vmstate {
 
     if (!$target) {
 	# second, use shared storage where VM has at least one disk
-	PVE::QemuServer::foreach_writable_storage($conf, sub {
+	PVE::QemuServer::foreach_storage_used_by_vm($conf, sub {
 	    my ($sid) = @_;
 	    my $scfg = PVE::Storage::storage_config($storecfg, $sid);
 	    return if !$scfg->{shared};
@@ -122,7 +122,7 @@ sub __snapshot_save_vmstate {
 
 	if (!$target) {
 	    # third, use local storage where VM has at least one disk
-	    PVE::QemuServer::foreach_writable_storage($conf, sub {
+	    PVE::QemuServer::foreach_storage_used_by_vm($conf, sub {
 		my ($sid) = @_;
 		my $scfg = PVE::Storage::storage_config($storecfg, $sid);
 		return if $scfg->{shared};
diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index c2b5ba2..1b32065 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -5792,7 +5792,7 @@ sub restore_tar_archive {
     warn $@ if $@;
 };
 
-sub foreach_writable_storage {
+sub foreach_storage_used_by_vm {
     my ($conf, $func) = @_;
 
     my $sidhash = {};
-- 
2.1.4





More information about the pve-devel mailing list