qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Should 'qemu-img commit' sparsify the backing file?


From: Fam Zheng
Subject: Re: [Qemu-devel] Should 'qemu-img commit' sparsify the backing file?
Date: Thu, 5 Nov 2015 17:46:01 +0800
User-agent: Mutt/1.5.21 (2010-09-15)

On Thu, 11/05 08:56, Richard W.M. Jones wrote:
> On Thu, Nov 05, 2015 at 03:14:49PM +0800, Fam Zheng wrote:
> > I don't think this the purpose of "qemu-img commit". Committing
> > "new" data in overlay.qcow2 has little to do with discarding backing
> > image's fragments where there are only explict zeroes.
> 
> In that case, why didn't this step sparsify the backing file?

Commit should be (by default, at least) as fast as possible, so committing
overlay.qcow2 shouldn't involve scanning the whole backing file.

But I think we can implement a dedicate "sparsify" command to do that, though.

> 
> > > (3) Sparsify the overlay:
> > > 
> > > $ virt-sparsify --in-place overlay.qcow2 
> > > $ du -sh fedora-22.img overlay.qcow2 
> > > 6.1G fedora-22.img
> > > 3.2M overlay.qcow2
> >     qemu-img convert fedora-22.img fedora-22.img.1
> > 
> > I don't think we have an in-place sparsifier now.
> 
> virt-sparsify ...
> 

Does virt-sparsify work if there is no file system present (e.g. the disk is
fully filled with zeroes) on the device?

Fam



reply via email to

[Prev in Thread] Current Thread [Next in Thread]