From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH v2 20/27] tools/libxl: Infrastructure for writing a v2 stream Date: Fri, 10 Jul 2015 12:10:39 +0100 Message-ID: <1436526639.23508.253.camel@citrix.com> References: <1436466413-25867-1-git-send-email-andrew.cooper3@citrix.com> <1436466413-25867-21-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-21-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: Ross Lagerwall , Ian Jackson , Wei Liu , Xen-devel List-Id: xen-devel@lists.xenproject.org On Thu, 2015-07-09 at 19:26 +0100, Andrew Cooper wrote: > From: Ross Lagerwall > > This contains the event machinary and state machines to write non-checkpointed "machinery" > /* Helper to set up reading some data from the stream. */ > +static void write_done(libxl__egc *egc, > + libxl__datacopier_state *dc, > + int rc, int onwrite, int errnoval) > +{ > + libxl__stream_write_state *stream = CONTAINER_OF(dc, *stream, dc); > + STATE_AO_GC(stream->ao); > + sws_record_done_cb cb = stream->record_done_callback; > + > + stream->record_done_callback = NULL; > + > + if (onwrite || errnoval) { > + LOG(ERROR, "rc %d, onwrite %d, errnoval %d", rc, onwrite, errnoval); As with saving, I think the dc has logged. > +void libxl__stream_write_start(libxl__egc *egc, > + libxl__stream_write_state *stream) > +{ > + libxl__datacopier_state *dc = &stream->dc; > + STATE_AO_GC(stream->ao); > + struct libxl__sr_hdr hdr = { 0 }; > + int ret = 0; > + > + assert(!stream->running); I think we both know what I'm going to say here ;-) Ian.