[libvirt] [PATCH] fix vol-create when target allocation=0

Martin Kletzander mkletzan at redhat.com
Mon Aug 24 09:47:07 UTC 2015


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20150824/b13101fa/attachment-0001.sig>


More information about the libvir-list mailing list