From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yang Hongyang Subject: Re: [PATCH v4 --for 4.6 COLOPre 24/25] tools/libxl: move remus state into a seperate structure Date: Wed, 15 Jul 2015 21:50:02 +0800 Message-ID: <55A6650A.7090207@cn.fujitsu.com> References: <1436946351-21118-1-git-send-email-yanghy@cn.fujitsu.com> <1436946351-21118-25-git-send-email-yanghy@cn.fujitsu.com> <1436966922.32371.64.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1436966922.32371.64.camel@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: wei.liu2@citrix.com, wency@cn.fujitsu.com, andrew.cooper3@citrix.com, yunhong.jiang@intel.com, eddie.dong@intel.com, xen-devel@lists.xen.org, guijianfeng@cn.fujitsu.com, rshriram@cs.ubc.ca, ian.jackson@eu.citrix.com List-Id: xen-devel@lists.xenproject.org On 07/15/2015 09:28 PM, Ian Campbell wrote: > On Wed, 2015-07-15 at 15:45 +0800, Yang Hongyang wrote: >> @@ -2921,6 +2911,26 @@ _hidden void libxl__checkpoint_devices_preresume(libxl__egc *egc, >> libxl__checkpoint_devices_state *cds); >> _hidden void libxl__checkpoint_devices_commit(libxl__egc *egc, >> libxl__checkpoint_devices_state *cds); >> + >> +/*----- Remus related state structure -----*/ >> +typedef struct libxl__remus_state libxl__remus_state; >> +struct libxl__remus_state { >> + /* private */ >> + libxl__ev_time checkpoint_timeout; /* used for Remus checkpoint */ >> + int interval; /* checkpoint interval */ >> + >> + /* abstract layer */ >> + libxl__checkpoint_devices_state cds; > > This mostly makes sense, I think, but this one field feels like it will > be wanted by colo too. Does that mean we will end up with dss->rs.cds > and dss->colo.cds doing effectively the same thing? Yes, checkpoint device is an abstract layer, used by both Remus & colo, in the abstract layer, we do not aware of remus or colo, in Remus or colo, we can use container of cds to retrive Remus/colo state. > > Ian. > > . > -- Thanks, Yang.