From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:46924) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T0yZJ-0005S2-35 for qemu-devel@nongnu.org; Mon, 13 Aug 2012 13:36:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T0yZI-0004kl-3V for qemu-devel@nongnu.org; Mon, 13 Aug 2012 13:36:45 -0400 Received: from e1.ny.us.ibm.com ([32.97.182.141]:36895) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T0yZI-0004kh-0C for qemu-devel@nongnu.org; Mon, 13 Aug 2012 13:36:44 -0400 Received: from /spool/local by e1.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 13 Aug 2012 13:36:42 -0400 Received: from d01relay01.pok.ibm.com (d01relay01.pok.ibm.com [9.56.227.233]) by d01dlp02.pok.ibm.com (Postfix) with ESMTP id 496016E808D for ; Mon, 13 Aug 2012 13:32:15 -0400 (EDT) Received: from d01av04.pok.ibm.com (d01av04.pok.ibm.com [9.56.224.64]) by d01relay01.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q7DHWEWV117078 for ; Mon, 13 Aug 2012 13:32:14 -0400 Received: from d01av04.pok.ibm.com (loopback [127.0.0.1]) by d01av04.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q7DHWDmt008549 for ; Mon, 13 Aug 2012 13:32:14 -0400 Message-ID: <50293A1C.1010209@linux.vnet.ibm.com> Date: Mon, 13 Aug 2012 13:32:12 -0400 From: Corey Bryant MIME-Version: 1.0 References: <1344690878-1555-1-git-send-email-coreyb@linux.vnet.ibm.com> <1344690878-1555-7-git-send-email-coreyb@linux.vnet.ibm.com> <50266C28.6070908@redhat.com> <502904C6.6050903@linux.vnet.ibm.com> <50292876.60808@redhat.com> <50292C70.6040903@linux.vnet.ibm.com> <502935B5.3020309@redhat.com> In-Reply-To: <502935B5.3020309@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v9 6/7] block: Enable qemu_open/close to work with fd sets List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: kwolf@redhat.com, aliguori@us.ibm.com, stefanha@linux.vnet.ibm.com, libvir-list@redhat.com, qemu-devel@nongnu.org, lcapitulino@redhat.com, pbonzini@redhat.com On 08/13/2012 01:13 PM, Eric Blake wrote: > On 08/13/2012 10:33 AM, Corey Bryant wrote: > >>> The only way it could fail is if we are trying to add an fd that is >>> already in the set, or if we don't find mon_fdset; both of which would >>> indicate logic bugs earlier in our program. Would it be worth asserting >>> that these conditions are impossible, and making this function return >>> void (the addition is always successful if it returns, since g_malloc0 >>> aborts rather than failing with ENOMEM)? >> >> I think what I did in v10 should suffice. I didn't update >> monitor_fdset_dup_fd_add(), but I did update the calling code. If the >> call fails then I set errno to EINVAL since (unless there's a bug) the >> only possible error is that the fdset ID was non-existent. >> >> It makes sense to add the asserts, but at this point I'd like to stick >> with what we have in v10 if that's ok. > > The problems of reading my inbox in FIFO order - I see now that v10 > landed before my comments on v9 :) Yes, what you did in v10 is probably > fine. > Heh. Well thanks again for the thorough review. If you have any other comments on the code let me know. But hopefully we're all set at this point and can make it into QEMU 1.2. -- Regards, Corey