From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41127) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YpvBa-0001O7-LU for qemu-devel@nongnu.org; Wed, 06 May 2015 05:00:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YpvBZ-0005dc-Qu for qemu-devel@nongnu.org; Wed, 06 May 2015 05:00:10 -0400 Message-ID: <5549D809.5070804@redhat.com> Date: Wed, 06 May 2015 10:59:53 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1430830009-29839-1-git-send-email-famz@redhat.com> <1430830009-29839-2-git-send-email-famz@redhat.com> <5548C071.1050805@redhat.com> <20150506014533.GA9341@fam-t430.nay.redhat.com> In-Reply-To: <20150506014533.GA9341@fam-t430.nay.redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/4] block: Fix dirty bitmap in bdrv_co_discard List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng Cc: Kevin Wolf , qemu-block@nongnu.org, qemu-devel@nongnu.org, Stefan Hajnoczi , jsnow@redhat.com, wangxiaolong@ucloud.cn On 06/05/2015 03:45, Fam Zheng wrote: >> > This is not enough, you also have to do the discard in block/mirror.c, >> > otherwise the destination image could even become fully provisioned! > I wasn't sure what if src and dest have different can_write_zeroes_with_unmap > value, but your argument is stronger. > > I will add discard in mirror. Besides that, do we need to compare the > can_write_zeroes_with_unmap? Hmm, if can_write_zeroes_with_unmap is set, it's probably better to write zeroes instead of discarding, in case the guest is relying on it. Paolo