]> xenbits.xensource.com Git - libvirt.git/commit
safezero: fall back to writing zeroes even when resizing
authorJán Tomko <jtomko@redhat.com>
Wed, 7 Jan 2015 15:49:00 +0000 (16:49 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 9 Jan 2015 12:48:23 +0000 (13:48 +0100)
commit1390c26847518faed81c344544109e097d800ce1
treefb2efd273d446cae4ce29fec5a457fc0fa91142f
parenta4b0040353c2a28ad07f2019182526054f07b8bc
safezero: fall back to writing zeroes even when resizing

Remove the resize flag and use the same code path for all callers.
This flag was added by commit 18f0316 to allow virStorageFileResize
use 'safezero' while preserving the behavior.

Explicitly return -2 when a fallback to a different method should
be done, to make the code path more obvious.

Fail immediately when ftruncate fails in the mmap method,
as we did before commit 18f0316.
src/locking/lock_driver_sanlock.c
src/storage/storage_backend.c
src/util/virfile.c
src/util/virfile.h
src/util/virstoragefile.c