Received: from eggs.gnu.org ([2001:4830:134:3::10]:50254) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YpcVL-0002bC-J4 for qemu-devel@nongnu.org; Tue, 05 May 2015 09:03:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YpcVH-00078J-Ji for qemu-devel@nongnu.org; Tue, 05 May 2015 09:03:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36976) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YpcVH-00078C-De for qemu-devel@nongnu.org; Tue, 05 May 2015 09:03:15 -0400 Date: Tue, 5 May 2015 15:03:10 +0200 From: Kevin Wolf Message-ID: <20150505130310.GE3866@noname.redhat.com> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5548AE65.2050405@redhat.com> Subject: Re: [Qemu-devel] Fwd: qemu drive mirror assert fault List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: John Snow , Fam Zheng , qemu-devel , stefanha@redhat.com, wangxiaolong@ucloud.cn Am 05.05.2015 um 13:49 hat Paolo Bonzini geschrieben: > > > 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? Initially I expected that it does, but when I checked, it turned out that it uses a different path. The only thing I found that really uses discard is the call in qemu-img that I mentioned. But that can't be the cause of the corruption you're debugging. Kevin