Received: from eggs.gnu.org ([208.118.235.92]:43126) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKqZx-0002t4-Kx for qemu-devel@nongnu.org; Wed, 27 Mar 2013 09:39:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UKqZw-00072N-62 for qemu-devel@nongnu.org; Wed, 27 Mar 2013 09:39:49 -0400 Received: from mail-bk0-x234.google.com ([2a00:1450:4008:c01::234]:35610) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKqZv-00070h-UH for qemu-devel@nongnu.org; Wed, 27 Mar 2013 09:39:48 -0400 Received: by mail-bk0-f52.google.com with SMTP id it16so1395593bkc.25 for ; Wed, 27 Mar 2013 06:39:47 -0700 (PDT) Date: Wed, 27 Mar 2013 14:39:43 +0100 From: Stefan Hajnoczi Message-ID: <20130327133943.GA23504@stefanha-thinkpad.muc.redhat.com> References: <1364314072-2474-1-git-send-email-stefanha@redhat.com> <20130327085156.GA14550@stefanha-thinkpad.muc.redhat.com> <87wqstj8kj.fsf@elfo.elfo> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87wqstj8kj.fsf@elfo.elfo> Subject: Re: [Qemu-devel] [PATCH 0/4] monitor: do not rely on O_NONBLOCK for passed file descriptors List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Juan Quintela Cc: Anthony Liguori , qemu-devel@nongnu.org, mprivozn@redhat.com, Corey Bryant , david.pravec@nethost.cz, liu ping fan , Stefan Hajnoczi On Wed, Mar 27, 2013 at 02:06:36PM +0100, Juan Quintela wrote: > Stefan Hajnoczi wrote: > > On Wed, Mar 27, 2013 at 04:37:52PM +0800, liu ping fan wrote: > >> On Wed, Mar 27, 2013 at 12:07 AM, Stefan Hajnoczi wrote: > >> > There are several places where QEMU accidentally relies on the > >> > O_NONBLOCK state > >> > of passed file descriptors. Exposing O_NONBLOCK state makes it > >> > part of the QMP > >> > >> If in future, we push more backend on their dedicated thread, will the > >> related fd be block? > > > > This series is not related to threading in QEMU. The convention it > > establishes is that passed fds are blocking. If QEMU wants to use > ^^^^^^^^ > You mean here non-blocking > > > nonblocking it must call qemu_set_block(fd). This works whether it is > ^^^^^^^^^^^^^^^^^^ > or here qemu_set_nonblock(fd) > > no? > > I guess the second one O:-) Blocking by default, call qemu_set_nonblock(fd) if you need non-blocking. :) Sorry for the mistake. Stefan