]> git.proxmox.com Git - pve-storage.git/blobdiff - PVE/Storage.pm
storage_migrate: log bandwidth limit
[pve-storage.git] / PVE / Storage.pm
index 6951e428d5f3d265e4c93b4ad11afb04f9a8a436..4a60615926145f81077e3e4a8b428c2aebedb9ca 100755 (executable)
@@ -637,8 +637,11 @@ sub storage_migrate {
     my $ssh_base = PVE::SSHInfo::ssh_info_to_command_base($target_sshinfo);
     local $ENV{RSYNC_RSH} = PVE::Tools::cmd2string($ssh_base);
 
-    my @cstream = ([ '/usr/bin/cstream', '-t', $ratelimit_bps ])
-       if defined($ratelimit_bps);
+    my @cstream;
+    if (defined($ratelimit_bps)) {
+       @cstream = ([ '/usr/bin/cstream', '-t', $ratelimit_bps ]);
+       $logfunc->("using a bandwidth limit of $ratelimit_bps bps for transferring '$volid'") if $logfunc;
+    }
 
     my $migration_snapshot;
     if (!defined($snapshot)) {