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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Attachment: signature.asc
Description: PGP signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]