Bug 1130506

Summary: RFE: virt-sparsify in copying mode should support qemu detect-zeroes
Product: [Community] Virtualization Tools Reporter: Richard W.M. Jones <rjones>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: NEW --- QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: ptoscano
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Richard W.M. Jones 2014-08-15 12:53:57 UTC
Description of problem:

Since May 2014, qemu has supported a block device "detect-zeroes"
option, which turns writes of zeroes into either an efficient
zero-write operation or an unmap.

I had previously tried such an approach in qemu (see:
https://lists.gnu.org/archive/html/qemu-devel/2012-07/msg03748.html )
and found that it makes virt-sparsify in normal copying mode
far more space efficient.  The reason is that virt-sparsify writes
a big file of just zeroes to an overlay file, and if detect_zeroes
is enabled then the overlay file doesn't actually need to grow much
to handle this (qcow2 can optimize).

So we should enable this feature in virt-sparsify and
the underlying libguestfs API.

Version-Release number of selected component (if applicable):

1.27.26