clone: Fix inverted --nonsparse check

I botched 4f66c423f7 and inverted the sparse check, meaning --nonsparse
on the command line would actually request a sparse image. Fix it

https://bugzilla.redhat.com/show_bug.cgi?id=1675743
This commit is contained in:
Cole Robinson 2019-05-13 09:56:06 -04:00
parent 721ac4f745
commit 622a363e5b
2 changed files with 3 additions and 3 deletions

View File

@ -1,7 +1,7 @@
<volume>
<name>new1.img</name>
<capacity>1000000</capacity>
<allocation>1000000</allocation>
<allocation>50000</allocation>
<target>
<format type="qcow2"/>
<features>
@ -12,7 +12,7 @@
<volume>
<name>new2.img</name>
<capacity>1000000</capacity>
<allocation>1000000</allocation>
<allocation>50000</allocation>
<target>
<format type="qcow2"/>
<features>

View File

@ -330,7 +330,7 @@ class Cloner(object):
vol_install.input_vol = orig_disk.get_vol_object()
vol_install.sync_input_vol(only_format=True)
if self.clone_sparse:
if not self.clone_sparse:
vol_install.allocation = vol_install.capacity
vol_install.reflink = self.reflink
clone_disk.set_vol_install(vol_install)