From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36200) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YpbfJ-0003Q8-Gi for qemu-devel@nongnu.org; Tue, 05 May 2015 08:09:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YpbfE-0003Xm-Qp for qemu-devel@nongnu.org; Tue, 05 May 2015 08:09:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41009) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YpbfE-0003Xi-JA for qemu-devel@nongnu.org; Tue, 05 May 2015 08:09:28 -0400 Date: Tue, 5 May 2015 20:09:25 +0800 From: Fam Zheng Message-ID: <20150505120925.GC9322@ad.nay.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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150505114825.GD3866@noname.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: Kevin Wolf Cc: Paolo Bonzini , John Snow , qemu-devel , stefanha@redhat.com, wangxiaolong@ucloud.cn On Tue, 05/05 13:48, Kevin Wolf wrote: > Am 05.05.2015 um 12:27 hat Fam Zheng geschrieben: > > On Tue, 05/05 12:13, Paolo Bonzini wrote: > > > > > > > > > On 05/05/2015 09:36, Fam Zheng wrote: > > > I don't think this commit is relevant. The bug is caused by > > > bdrv_co_discard clearing the bitmap (which is not supported during > > > iteration, and is caught by the assertion). That bdrv_reset_dirty is > > > not removed by the commit you pointed out. > > > > You are right, I think the bug is the bdrv_reset_dirty in bdrv_co_discard. The > > discard may zero out the src area (depending on the backend), we should > > probably replicate this to dest (actual data or the discard operation), rather > > than forgetting the change. > > 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? The guest could be taking advantage of this "can_write_zeroes_with_unmap".. Fam