mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-04-30 21:33:07 +00:00
change check for write-zeros
instead of hardcoding the storagetypes for writing zeros on a backup restore, we use volume_has_feature with 'sparseinit' for determining if we can omit writing zeros Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
5abfaf2dcd
commit
88240a83fb
@ -5607,9 +5607,7 @@ sub restore_vma_archive {
|
||||
PVE::Storage::activate_volumes($cfg,[$volid]);
|
||||
|
||||
my $write_zeros = 1;
|
||||
# fixme: what other storages types initialize volumes with zero?
|
||||
if ($scfg->{type} eq 'dir' || $scfg->{type} eq 'nfs' || $scfg->{type} eq 'glusterfs' ||
|
||||
$scfg->{type} eq 'sheepdog' || $scfg->{type} eq 'rbd') {
|
||||
if (PVE::Storage::volume_has_feature($cfg, 'sparseinit', $volid)) {
|
||||
$write_zeros = 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user