On Mon, Aug 24, 2015 at 01:50:41PM +0800, Chunyan Liu wrote:
Regression is introduced by commit e30297b0. After that, it will
report "Cannot fill file" error with following xml file:
<volume>
<name>virtinst-vmlinuz-xen.tP1NHh</name>
<capacity>4343792</capacity>
<allocation>0</allocation>
<target>
<format type="raw"/>
<nocow/>
</target>
</volume>
Because of this, installing xen pv guest with virt-manager fails.
Reason is: posix_fallocate(int fd, off_t offset, off_t len) will
return EINVAL when len is equal to 0. So, this patch adds a check
before calling safezero().
Oh, god that you've found out the root cause, although the same patch
is already on the list:
https://www.redhat.com/archives/libvir-list/2015-August/msg00808.html
Although it would be nice if it had the root cause (or at least the
causing commit) in its commit message as well. Cc'ing the author of
the previous patch in case he hasn't pushed yet.
Martin