From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wen Congyang Subject: Re: [PATCH v9 09/25] tools/libx{l, c}: introduce should_checkpoint callback Date: Wed, 27 Jan 2016 09:18:28 +0800 Message-ID: <56A81AE4.6080503@cn.fujitsu.com> References: <1451443075-27428-1-git-send-email-wency@cn.fujitsu.com> <1451443075-27428-10-git-send-email-wency@cn.fujitsu.com> <20160126205032.GD27940@char.us.oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20160126205032.GD27940@char.us.oracle.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: Konrad Rzeszutek Wilk Cc: Lars Kurth , Changlong Xie , Wei Liu , Ian Campbell , Andrew Cooper , Jiang Yunhong , Ian Jackson , xen devel , Dong Eddie , Gui Jianfeng , Shriram Rajagopalan , Yang Hongyang List-Id: xen-devel@lists.xenproject.org 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 >> Signed-off-by: Wen Congyang >> --- >> 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 > > > . >