[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 20/27] tools/libxl: Infrastructure for writing a v2 stream



On 10/07/15 11:55, Ian Campbell wrote:
> On Mon, 2015-06-15 at 14:44 +0100, Andrew Cooper wrote:
>> +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);
> This has the same issue wrt who initialises this when as the restore
> side.
>
>> +    stream->running = true;
>> +
>> +    memset(dc, 0, sizeof(*dc));
>> +    dc->readwhat = "";
>> +    dc->copywhat = "suspend header";
>> +    dc->writewhat = "save/migration stream";
>> +    dc->ao = ao;
>> +    dc->readfd = -1;
>> +    dc->writefd = stream->fd;
>> +    dc->maxsz = INT_MAX;
>> +    dc->bytes_to_read = INT_MAX;
>> +    dc->callback = stream_header_done;
> On the read side some of this was nicely encapsulated in a helper. Not a
> blocker, just an observation for a potential future tidying.
>
> So, the only immediate issue is the ->running one, which I suppose will
> be discussed on the restore side patch and the same conclusion applied
> here.

You realise you have moved back onto v1 of the series?  This is very
different in v2.

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.