]> git.ipfire.org Git - thirdparty/libvirt.git/commit
use virFileAllocate in virStorageFileResize
authorJán Tomko <jtomko@redhat.com>
Mon, 25 Sep 2017 14:29:34 +0000 (16:29 +0200)
committerJán Tomko <jtomko@redhat.com>
Wed, 27 Sep 2017 12:40:44 +0000 (14:40 +0200)
commit5463d9596903b370e7d078eeacb0e3f3c71c526f
tree081e951d11a6f656933e3c2d9e7b8e30ddf08610
parent63d3d895a2c00a849440706b3daa7199296b4b33
use virFileAllocate in virStorageFileResize

Introduce a new function virFileAllocate that will call the
non-destructive variants of safezero, essentially reverting
my commit 1390c268
    safezero: fall back to writing zeroes even when resizing
back to the state as of commit 18f0316
    virstoragefile: Have virStorageFileResize use safezero

This means that _ALLOCATE flag will no longer work on platforms
without the allocate syscalls, but it will not overwrite data
either.
src/util/virfile.c
src/util/virfile.h
src/util/virstoragefile.c