Received: from eggs.gnu.org ([208.118.235.92]:50632) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKm5b-0006Vz-Uk for qemu-devel@nongnu.org; Wed, 27 Mar 2013 04:52:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UKm5Y-0003NL-0u for qemu-devel@nongnu.org; Wed, 27 Mar 2013 04:52:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:30682) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKm5X-0003MV-Qo for qemu-devel@nongnu.org; Wed, 27 Mar 2013 04:52:07 -0400 Date: Wed, 27 Mar 2013 09:51:56 +0100 From: Stefan Hajnoczi Message-ID: <20130327085156.GA14550@stefanha-thinkpad.muc.redhat.com> References: <1364314072-2474-1-git-send-email-stefanha@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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: liu ping fan Cc: Anthony Liguori , david.pravec@nethost.cz, Juan Quintela , mprivozn@redhat.com, Corey Bryant , qemu-devel@nongnu.org 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 nonblocking it must call qemu_set_block(fd). This works whether it is done from a traditional QEMU thread or a data plane thread. Stefan