From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH v2 25/27] tools/libxl: Handle checkpoint records in a libxl migration v2 stream Date: Fri, 10 Jul 2015 12:18:58 +0100 Message-ID: <1436527138.23508.259.camel@citrix.com> References: <1436466413-25867-1-git-send-email-andrew.cooper3@citrix.com> <1436466413-25867-26-git-send-email-andrew.cooper3@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1436466413-25867-26-git-send-email-andrew.cooper3@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: Andrew Cooper Cc: Wei Liu , Ian Jackson , Xen-devel List-Id: xen-devel@lists.xenproject.org On Thu, 2015-07-09 at 19:26 +0100, Andrew Cooper wrote: > @@ -3349,6 +3353,8 @@ struct libxl__stream_read_state { > LIBXL_STAILQ_HEAD(, libxl__sr_record_buf) record_queue; > enum { > SRS_PHASE_NORMAL, > + SRS_PHASE_BUFFERING, > + SRS_PHASE_UNBUFFERING, I'd be inclined towards calling the latter DRAINING or PROCESSING or some such, perhaps tying into my comment about the separate recursion guard thing earlier on in the series. But that's a bikeshedding issue on an internal thing so my only real comment is: > + if (rc == 0) > + ret = 0; /* Success */ > + else if (stream->phase == SRS_PHASE_BUFFERING) > + ret = 2; /* Failover */ > + else > + ret = 1; /* Error (fatal) */ Maybe we should have had an enum or some #defines for these (this is really a comment on some previous patch). Ian.