From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38479) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yc97q-0005qd-M7 for qemu-devel@nongnu.org; Sun, 29 Mar 2015 05:03:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yc97j-0008HB-8T for qemu-devel@nongnu.org; Sun, 29 Mar 2015 05:03:22 -0400 Received: from mail-wi0-x230.google.com ([2a00:1450:400c:c05::230]:37654) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yc97j-0008H5-2T for qemu-devel@nongnu.org; Sun, 29 Mar 2015 05:03:15 -0400 Received: by wiaa2 with SMTP id a2so86033596wia.0 for ; Sun, 29 Mar 2015 02:03:14 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <5517BFCB.20304@redhat.com> Date: Sun, 29 Mar 2015 11:03:07 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1424883128-9841-1-git-send-email-dgilbert@redhat.com> <1424883128-9841-9-git-send-email-dgilbert@redhat.com> <5516C8FE.5090602@redhat.com> <20150329040714.GA9908@voom.fritz.box> In-Reply-To: <20150329040714.GA9908@voom.fritz.box> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v5 08/45] Return path: socket_writev_buffer: Block even on non-blocking fd's List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: David Gibson Cc: aarcange@redhat.com, yamahata@private.email.ne.jp, quintela@redhat.com, qemu-devel@nongnu.org, "Dr. David Alan Gilbert (git)" , amit.shah@redhat.com, yanghy@cn.fujitsu.com On 29/03/2015 06:07, David Gibson wrote: > On Sat, Mar 28, 2015 at 04:30:06PM +0100, Paolo Bonzini wrote: >> >> >> On 25/02/2015 17:51, Dr. David Alan Gilbert (git) wrote: >>> + if (err != EAGAIN) { >> >> if (err != EAGAIN && err != EWOULDBLOCK) > > I assume that's for the benefit of non-Linux hosts? On Linux > EAGAIN == EWOULDBLOCK. Yes, that's just the standard idiom in QEMU. This is generic code, so assumption based on the host platform are not wise. :) Paolo