From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] qemu: qemu_fopen_fd: differentiate between reader and writer user Date: Thu, 16 Oct 2008 10:16:23 +0200 Message-ID: <48F6F857.1090302@redhat.com> References: <1223829030-14962-1-git-send-email-uril@qumranet.com> <48F22BF1.3000608@redhat.com> <48F68746.8010904@il.qumranet.com> <48F6BEAB.1060705@codemonkey.ws> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Uri Lublin , kvm@vger.kernel.org To: Anthony Liguori Return-path: Received: from mx2.redhat.com ([66.187.237.31]:41394 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752733AbYJPIQ2 (ORCPT ); Thu, 16 Oct 2008 04:16:28 -0400 In-Reply-To: <48F6BEAB.1060705@codemonkey.ws> Sender: kvm-owner@vger.kernel.org List-ID: Anthony Liguori wrote: > > Yeah, I tried to implement the read/write mode buffer and it ends up > not to work very nicely. I don't remember the precise issue, but I > hit some sort of wall that I thought was a fundamental limitation. I > ended up forcing the QEMUFile to be in either read or write mode > similar to your original patch without introducing a new option as an > argument. > It really depends on whether the file descriptor is a file or a socket. With files, the read and write streams are backed by the same storage, so they can intersect. With sockets, the read and write streams are completely independent. Everything is a file, except when it isn't. -- error compiling committee.c: too many arguments to function