[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] qemu-img: Allow unmap backing image for zeroed
From: |
Fam Zheng |
Subject: |
Re: [Qemu-devel] [PATCH] qemu-img: Allow unmap backing image for zeroed clusters |
Date: |
Tue, 27 Sep 2016 16:59:51 +0800 |
User-agent: |
Mutt/1.7.0 (2016-08-17) |
On Tue, 09/27 10:41, Kevin Wolf wrote:
> Am 27.09.2016 um 04:20 hat Fam Zheng geschrieben:
> > We already specified BDRV_O_UNMAP when opening images in 'qemu-img
> > commit', but didn't turn on the "unmap" in the active commit job. This
> > patch fixes that so that zeroed clusters in top image can be discarded
> > which is desired in the virt-sparsify use case, where a temporary
> > overlay is created and fstrim'ed before commiting back, to free space in
> > the original image.
> >
> > The block-commit keeps the existing behavior.
> >
> > Signed-off-by: Fam Zheng <address@hidden>
>
> Is there a good reason for not using discard in an active commit if the
> image was opened with BDRV_O_UNMAP? That is, wouldn't it make sense to
> just set the unmap option for the mirror unconditionally and also for
> block-commit?
>
> If there is a reason, we should probably add an option to block-commit,
> but I still feels that enabling it should be the default then.
I didn't touch block-commit because I wasn't sure, but you made a good point,
we can turn this on there too.
Fam