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

Re: [Xen-devel] [PATCH v9 09/25] tools/libx{l, c}: introduce should_checkpoint callback



On 01/27/2016 04:50 AM, Konrad Rzeszutek Wilk wrote:
> On Wed, Dec 30, 2015 at 10:37:39AM +0800, Wen Congyang wrote:
>> Under COLO, we are doing checkpoint on demand, if this
>> callback returns 1, we will take another checkpoint.
> 
> So 1 means OK.
> 
>> 0 indicates unexpected error.
> 
> Why not return an error?
>>
>> Signed-off-by: Yang Hongyang <hongyang.yang@xxxxxxxxxxxx>
>> Signed-off-by: Wen Congyang <wency@xxxxxxxxxxxxxx>
>> ---
>>  tools/libxc/include/xenguest.h     | 18 ++++++++++++++++++
>>  tools/libxl/libxl_save_msgs_gen.pl |  7 ++++---
>>  2 files changed, 22 insertions(+), 3 deletions(-)
>>
>> diff --git a/tools/libxc/include/xenguest.h b/tools/libxc/include/xenguest.h
>> index bd133af..88d6e13 100644
>> --- a/tools/libxc/include/xenguest.h
>> +++ b/tools/libxc/include/xenguest.h
>> @@ -62,6 +62,15 @@ struct save_callbacks {
>>       * 1: take another checkpoint */
>>      int (*checkpoint)(void* data);
>>  
>> +    /*
>> +     * Called after the checkpoint callback.
>> +     *
>> +     * returns:
>> +     * 0: terminate checkpointing gracefully
> 
> checkpointing terminated gracefully
> 
> Why not return -EXX instead ?

Other callbacks also use 0 to indicate an error.

Thanks
Wen Congyang

> 
>> +     * 1: take another checkpoint
> 
> 
> .
> 




_______________________________________________
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®.