]> git.proxmox.com Git - mirror_qemu.git/commit - block/raw-posix.c
block/raw-posix: Only sync after successful preallocation
authorMax Reitz <mreitz@redhat.com>
Tue, 18 Nov 2014 10:23:05 +0000 (11:23 +0100)
committerKevin Wolf <kwolf@redhat.com>
Tue, 18 Nov 2014 11:09:00 +0000 (12:09 +0100)
commit731de38052b245eab79e417aeac5e1dcebe6437f
tree20d6d63241962ab412c676feddabe8d6d00c4901
parent39411cf3c316de0fe3cbb9585774bacfe3bd8efd
block/raw-posix: Only sync after successful preallocation

The loop which filled the file with zeroes may have been left early due
to an error. In that case, the fsync() should be skipped.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/raw-posix.c