From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40031) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YlE0U-0007Cx-Mr for qemu-devel@nongnu.org; Thu, 23 Apr 2015 06:05:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YlE0U-000378-13 for qemu-devel@nongnu.org; Thu, 23 Apr 2015 06:05:18 -0400 Message-ID: <5538C3CC.9030902@redhat.com> Date: Thu, 23 Apr 2015 12:05:00 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1428055280-12015-1-git-send-email-wency@cn.fujitsu.com> <1428055280-12015-2-git-send-email-wency@cn.fujitsu.com> <20150420153047.GB32653@stefanha-thinkpad.redhat.com> <5535A727.5080402@cn.fujitsu.com> <55366C81.1080202@redhat.com> <20150422093101.GD3882@noname.redhat.com> <5537742A.90504@redhat.com> <20150423090031.GB5289@noname.redhat.com> <5538B813.5090506@cn.fujitsu.com> In-Reply-To: <5538B813.5090506@cn.fujitsu.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH COLO v3 01/14] docs: block replication's description List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Wen Congyang , Kevin Wolf Cc: Fam Zheng , Lai Jiangshan , qemu block , Jiang Yunhong , Dong Eddie , qemu devel , Max Reitz , Gonglei , Stefan Hajnoczi , Yang Hongyang , "Dr. David Alan Gilbert" , zhanghailiang On 23/04/2015 11:14, Wen Congyang wrote: > The bs->file->driver should support backing file, and use backing reference > already. > > What about the primary side? We should control when to connect to NBD server, > not in nbd_open(). My naive suggestion could be to add a BDRV_O_NO_CONNECT option to bdrv_open and a separate bdrv_connect callback. Open would fail if BDRV_O_NO_CONNECT is specified and drv->bdrv_connect is NULL. You would then need a way to have quorum pass BDRV_O_NO_CONNECT. Perhaps quorum is not a great match after all, and it's better to add a new "colo" driver similar to quorum but simpler and only using the read policy that you need for colo. The new driver would also know how to use BDRV_O_NO_CONNECT. In any case the amount of work needed would not be too big. Paolo