From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59578) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YpbMX-0007yQ-MX for qemu-devel@nongnu.org; Tue, 05 May 2015 07:50:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YpbMR-0005ID-HN for qemu-devel@nongnu.org; Tue, 05 May 2015 07:50:09 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57982) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YpbMR-0005Hh-CL for qemu-devel@nongnu.org; Tue, 05 May 2015 07:50:03 -0400 Message-ID: <5548AE65.2050405@redhat.com> Date: Tue, 05 May 2015 13:49:57 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <55424F3C.1050209@redhat.com> <20150505073609.GA9322@ad.nay.redhat.com> <554897C4.20804@redhat.com> <20150505102743.GA20503@ad.nay.redhat.com> <20150505114825.GD3866@noname.redhat.com> In-Reply-To: <20150505114825.GD3866@noname.redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] Fwd: qemu drive mirror assert fault List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf , Fam Zheng Cc: John Snow , qemu-devel , stefanha@redhat.com, wangxiaolong@ucloud.cn On 05/05/2015 13:48, Kevin Wolf wrote: > It depends. In its basic form, bdrv_discard() just means "I don't care > about the data any more". Then clearing the dirty bitmap is correct. > > The content is only important if the caller used discard to write zeros > because can_write_zeroes_with_unmap = true. Do we have any such callers > apart from qemu-img convert? Yes, the SCSI command WRITE SAME with UNMAP = 1 (not coincidentially :)) calls discard too. Who knows what the guest used it for... However, write zeroes doesn't go through bdrv_co_discard, does it? Paolo