From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48642) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YLoLd-0001X2-TW for qemu-devel@nongnu.org; Thu, 12 Feb 2015 02:38:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YLoLY-00067a-TE for qemu-devel@nongnu.org; Thu, 12 Feb 2015 02:38:05 -0500 Received: from [59.151.112.132] (port=14786 helo=heian.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YLoLY-00066z-6h for qemu-devel@nongnu.org; Thu, 12 Feb 2015 02:38:00 -0500 Message-ID: <54DC58E6.7060608@cn.fujitsu.com> Date: Thu, 12 Feb 2015 15:40:22 +0800 From: Wen Congyang MIME-Version: 1.0 References: <1423710438-14377-1-git-send-email-wency@cn.fujitsu.com> <1423710438-14377-2-git-send-email-wency@cn.fujitsu.com> <20150212072117.GB32554@ad.nay.redhat.com> In-Reply-To: <20150212072117.GB32554@ad.nay.redhat.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC PATCH 01/14] docs: block replication's description List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng Cc: Kevin Wolf , Lai Jiangshan , Jiang Yunhong , Dong Eddie , qemu devel , "Dr. David Alan Gilbert" , Gonglei , Stefan Hajnoczi , Paolo Bonzini , Yang Hongyang , zhanghailiang On 02/12/2015 03:21 PM, Fam Zheng wrote: > Hi Congyang, > > On Thu, 02/12 11:07, Wen Congyang wrote: >> +== Workflow == >> +The following is the image of block replication workflow: >> + >> + +----------------------+ +------------------------+ >> + |Primary Write Requests| |Secondary Write Requests| >> + +----------------------+ +------------------------+ >> + | | >> + | (4) >> + | V >> + | /-------------\ >> + | Copy and Forward | | >> + |---------(1)----------+ | Disk Buffer | >> + | | | | >> + | (3) \-------------/ >> + | speculative ^ >> + | write through (2) >> + | | | >> + V V | >> + +--------------+ +----------------+ >> + | Primary Disk | | Secondary Disk | >> + +--------------+ +----------------+ >> + >> + 1) Primary write requests will be copied and forwarded to Secondary >> + QEMU. >> + 2) Before Primary write requests are written to Secondary disk, the >> + original sector content will be read from Secondary disk and >> + buffered in the Disk buffer, but it will not overwrite the existing >> + sector content in the Disk buffer. > > I'm a little confused by the tenses ("will be" versus "are") and terms. I am > reading them as "s/will be/are/g" > > Why do you need this buffer? We only sync the disk till next checkpoint. Before next checkpoint, secondary vm write to the buffer. > > If both primary and secondary write to the same sector, what is saved in the > buffer? The primary content will be written to the secondary disk, and the secondary content is saved in the buffer. Thanks Wen Congyang > > Fam > >> + 3) Primary write requests will be written to Secondary disk. >> + 4) Secondary write requests will be buffered in the Disk buffer and it >> + will overwrite the existing sector content in the buffer. >> + > . >