From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59729) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1RxA-0000TO-GT for qemu-devel@nongnu.org; Mon, 22 Jul 2013 22:03:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V1Rx8-0004tu-4u for qemu-devel@nongnu.org; Mon, 22 Jul 2013 22:03:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43656) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1Rx7-0004tn-U9 for qemu-devel@nongnu.org; Mon, 22 Jul 2013 22:03:50 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r6N23lHW004340 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 22 Jul 2013 22:03:48 -0400 Date: Tue, 23 Jul 2013 10:03:43 +0800 From: Fam Zheng Message-ID: <20130723020343.GB25603@T430s.redhat.com> References: <1374464794-13057-1-git-send-email-famz@redhat.com> <1374464794-13057-2-git-send-email-famz@redhat.com> <51ECD26A.80104@redhat.com> <20130722064834.GA1992@T430s.redhat.com> <51ED1262.4000000@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <51ED1262.4000000@redhat.com> Subject: Re: [Qemu-devel] [PATCH 1/2] block: allow live commit of active image Reply-To: famz@redhat.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: kwolf@redhat.com, jcody@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com On Mon, 07/22 13:07, Paolo Bonzini wrote: > Il 22/07/2013 08:48, Fam Zheng ha scritto: > >> > I have only skimmed the patch, but I think this is incomplete. > >> > Management needs to know the moment when 'active' is not valid anymore, > >> > thus this job needs to be completed manually with "block-job-complete". > > Does management need access to 'active' image outside of QEMU process? > > Although original 'active' it is "dropped" by bdrv_drop_intermediate, > > the pointers to original 'active' is still valid because 'base' is moved > > to this address (with bdrv_swap). I don't know, what is the problem here > > for management? > > Management needs to know, in case of a crash in QEMU or management > itself at exactly the right time, whether any I/O have been issued by > the guest to the 'base'. The only way to do this is, at this time, > something like > > stop > block-job-complete ide0-hd0 > cont > I see, this way the job needs to stop vm in the point of all copying drained, then report 'ready' and wait for manual complete before swapping active, sounds not so good. Ideally we should mirror writes _synchronously_ to 'top' and 'base' after 'ready' state and wait for manual complete to switch image. Do you think this is easy to do? Fam