From mboxrd@z Thu Jan 1 00:00:00 1970 From: Uri Lublin Subject: Re: [PATCH] qemu: qemu_fopen_fd: differentiate between reader and writer user Date: Thu, 16 Oct 2008 12:52:25 +0200 Message-ID: <48F71CE9.6090902@il.qumranet.com> References: <1223829030-14962-1-git-send-email-uril@qumranet.com> <48F22BF1.3000608@redhat.com> <48F23D4D.2050709@codemonkey.ws> <48F23F42.10405@redhat.com> <48F277A0.8040407@codemonkey.ws> <48F2BA83.7000101@codemonkey.ws> <48F69AAB.4010404@il.qumranet.com> <48F6BFA1.9070608@codemonkey.ws> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Avi Kivity , Uri Lublin , kvm@vger.kernel.org To: Anthony Liguori Return-path: Received: from il.qumranet.com ([212.179.150.194]:45900 "EHLO il.qumranet.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751685AbYJPKw2 (ORCPT ); Thu, 16 Oct 2008 06:52:28 -0400 In-Reply-To: <48F6BFA1.9070608@codemonkey.ws> Sender: kvm-owner@vger.kernel.org List-ID: Anthony Liguori wrote: > Uri Lublin wrote: >> Anthony Liguori wrote: > > I have already cut your text, but I don't understand the comment about > not being "full duplex". Is there a reason why migration needs to be > bidirectional? I don't think there's a fundamental reason it needs to > be and I think there are some advantages to it being unidirectional. > Avi was concerned that my patch makes QEMUFile uni-directional, so I assumed you are trying to "fix" that too. Unidirectional-only usage of QEMUFile was working. The problem was that the fd implementation registered both get_buffer and put_buffer. If you never register both non-NULL get_buffer and put_buffer (unidirectional), then you do not need the is_write field. Adding the error checking is valuable. Thanks, Uri.