From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33245) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YpbQs-0006FS-5r for qemu-devel@nongnu.org; Tue, 05 May 2015 07:54:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YpbQn-0007J2-7T for qemu-devel@nongnu.org; Tue, 05 May 2015 07:54:38 -0400 Received: from mail-wi0-x22c.google.com ([2a00:1450:400c:c05::22c]:33362) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YpbQm-0007I9-UX for qemu-devel@nongnu.org; Tue, 05 May 2015 07:54:33 -0400 Received: by wief7 with SMTP id f7so99205103wie.0 for ; Tue, 05 May 2015 04:54:31 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <5548AF73.3070901@redhat.com> Date: Tue, 05 May 2015 13:54:27 +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> <5548AE65.2050405@redhat.com> In-Reply-To: <5548AE65.2050405@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:49, Paolo Bonzini wrote: > > > 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. s/discard/write_zeroes/ of course! Paolo > Who knows what the guest used it for... > However, write zeroes doesn't go through bdrv_co_discard, does it? > > Paolo > >