From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50770) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZK45r-0004es-7h for qemu-devel@nongnu.org; Tue, 28 Jul 2015 08:34:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZK45o-0001T8-5U for qemu-devel@nongnu.org; Tue, 28 Jul 2015 08:34:51 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34201) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZK45n-0001Su-W6 for qemu-devel@nongnu.org; Tue, 28 Jul 2015 08:34:48 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id 6CE2B91DBF for ; Tue, 28 Jul 2015 12:34:47 +0000 (UTC) References: <1437998061-22771-1-git-send-email-pbonzini@redhat.com> <20150728040959.GA1865@ad.nay.redhat.com> From: Paolo Bonzini Message-ID: <55B776E3.3080102@redhat.com> Date: Tue, 28 Jul 2015 14:34:43 +0200 MIME-Version: 1.0 In-Reply-To: <20150728040959.GA1865@ad.nay.redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] qemu-nbd: remove unnecessary qemu_notify_event() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng Cc: qemu-devel@nongnu.org On 28/07/2015 06:09, Fam Zheng wrote: > On Mon, 07/27 13:54, Paolo Bonzini wrote: >> This was needed when qemu-nbd was using qemu_set_fd_handler2. It is >> not needed anymore now that nbd_update_server_fd_handler is called >> whenever nbd_can_accept() can change from false to true. >> nbd_update_server_fd_handler will call qemu_set_fd_handler(), >> which will call qemu_notify_event(). >> >> Signed-off-by: Paolo Bonzini >> --- >> qemu-nbd.c | 1 - >> 1 file changed, 1 deletion(-) >> >> diff --git a/qemu-nbd.c b/qemu-nbd.c >> index 5106b80..d9644b2 100644 >> --- a/qemu-nbd.c >> +++ b/qemu-nbd.c >> @@ -362,7 +362,6 @@ static void nbd_client_closed(NBDClient *client) >> state = TERMINATE; >> } >> nbd_update_server_fd_handler(server_fd); >> - qemu_notify_event(); >> nbd_client_put(client); >> } >> >> -- >> 2.4.3 >> >> > > Reviewed-by: Fam Zheng > > A question not related to this patch: unlike aio_set_fd_handler, > qemu_set_fd_handler doesn't call qemu_notify_event for the "delete" branch. Is > that intended? Yes. In fact I think qemu_notify_event() is not needed at all in qemu_set_fd_handler() because there are no concurrent ppoll() calls during a qemu_set_fd_handler(). Paolo