From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:56513) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T0yCu-0006ot-L8 for qemu-devel@nongnu.org; Mon, 13 Aug 2012 13:13:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T0yCs-0006CK-UV for qemu-devel@nongnu.org; Mon, 13 Aug 2012 13:13:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55868) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T0yCs-0006CE-LV for qemu-devel@nongnu.org; Mon, 13 Aug 2012 13:13:34 -0400 Message-ID: <502935B5.3020309@redhat.com> Date: Mon, 13 Aug 2012 11:13:25 -0600 From: Eric Blake 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> In-Reply-To: <50292C70.6040903@linux.vnet.ibm.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig3A6C6F1547F473EE29C6FD80" 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: Corey Bryant 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 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig3A6C6F1547F473EE29C6FD80 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 asserti= ng >> 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)? >=20 > 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. >=20 > 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. --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enig3A6C6F1547F473EE29C6FD80 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJQKTW2AAoJEKeha0olJ0NqacYH/3MPXsvkWKNgBay9RS5QgLcX gLN3JMV5PnufcMgVeTjsMZ9kEySb87uxcZac8ll9OC4wWjh3UQc7RS+ZscV0pBPu 0Zmlk/Fr8tdTylEcHCta9YvC+vsadrqP2wzhDG+o16kK9a/vZHKIj3JxZF3z048m s05k6/0V9nr6ipbBx/fGfVcaW2seZd0iPVEWofYS0YG/Gkz4WkLskZgXJieQOgSX YeWOGLKLZAhhI5MdkO/EMkcu0SNWWqFqaIJPbLMcc2lAAwsmMcTqu3Hh3dzQmoxX oW4WTadIw5XwXbG65qwYTI6aitTbeN+Pr7tUf7UG02uq+f21HYM5m3aYbm2avjo= =DyKg -----END PGP SIGNATURE----- --------------enig3A6C6F1547F473EE29C6FD80--