From mboxrd@z Thu Jan 1 00:00:00 1970 From: Xiao Guangrong Subject: Re: [PATCH 4/8] migration: introduce control_save_page() Date: Fri, 16 Mar 2018 16:52:40 +0800 Message-ID: <7c48472f-d2b9-5b69-c427-c8f96ff71f9f@gmail.com> References: <20180313075739.11194-1-xiaoguangrong@tencent.com> <20180313075739.11194-5-xiaoguangrong@tencent.com> <20180315113759.GD3062@work-vm> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, mst@redhat.com, mtosatti@redhat.com, Xiao Guangrong , qemu-devel@nongnu.org, pbonzini@redhat.com To: "Dr. David Alan Gilbert" , quintela@redhat.com Return-path: In-Reply-To: <20180315113759.GD3062@work-vm> Content-Language: en-US List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+gceq-qemu-devel2=m.gmane.org@nongnu.org Sender: "Qemu-devel" List-Id: kvm.vger.kernel.org On 03/15/2018 07:37 PM, Dr. David Alan Gilbert wrote: > * guangrong.xiao@gmail.com (guangrong.xiao@gmail.com) wrote: >> From: Xiao Guangrong >> >> Abstract the common function control_save_page() to cleanup the code, >> no logic is changed >> >> Signed-off-by: Xiao Guangrong > > Reviewed-by: Dr. David Alan Gilbert > Thank you, Dave! >> >> +/* >> + * @pages: the number of pages written by the control path, >> + * < 0 - error >> + * > 0 - number of pages written > > What about 0 ! > The control patch does not support 0 (means duplication). :) Based on the implementation of qemu_rdma_save_page(), if any data is properly posted out, @bytes_sent is set to 1, otherwise a error is detected...