From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:43574) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TM4Lc-0002dL-ML for qemu-devel@nongnu.org; Wed, 10 Oct 2012 18:01:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TM4Lb-0004QJ-Il for qemu-devel@nongnu.org; Wed, 10 Oct 2012 18:01:48 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34183) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TM4Lb-0004Pr-8p for qemu-devel@nongnu.org; Wed, 10 Oct 2012 18:01:47 -0400 Message-ID: <5075F042.4070505@redhat.com> Date: Wed, 10 Oct 2012 16:01:38 -0600 From: Eric Blake MIME-Version: 1.0 References: <1349878805-16352-1-git-send-email-coreyb@linux.vnet.ibm.com> <1349878805-16352-3-git-send-email-coreyb@linux.vnet.ibm.com> In-Reply-To: <1349878805-16352-3-git-send-email-coreyb@linux.vnet.ibm.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enigC6F198227BBBC7AFA75C060E" Subject: Re: [Qemu-devel] [PATCH v2 2/3] monitor: Enable adding an inherited fd to an fd set List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Corey Bryant Cc: kwolf@redhat.com, libvir-list@redhat.com, qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigC6F198227BBBC7AFA75C060E Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 10/10/2012 08:20 AM, Corey Bryant wrote: > qmp_add_fd() gets an fd that was received over a socket with > SCM_RIGHTS and adds it to an fd set. This patch adds support > that will enable adding an fd that was inherited on the > command line to an fd set. >=20 > This patch also prevents removal of an fd from an fd set during > initialization. This allows the fd to remain in the fd set after > probing of the image file. You're mixing code motion and semantic change in one patch (keyword "also" in your commit message; should the semantic change be moved to a separate patch (possibly squashed into 1/3)? >=20 > Signed-off-by: Corey Bryant > --- > =20 > - if (has_fdset_id) { > - QLIST_FOREACH(mon_fdset, &mon_fdsets, next) { > - if (mon_fdset->id =3D=3D fdset_id) { > - break; > - } > - } > - } Since you maintain mon_fdsets in sorted id order, should you optimize this loop to abort the QLIST_FOREACH early if fdset_id is less than mon_fdset->id? [I only noticed this because of code motion, so it is a pre-existing condition and therefore a separate patch, or another thing to squash into 1/3] --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enigC6F198227BBBC7AFA75C060E 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://www.enigmail.net/ iQEcBAEBCAAGBQJQdfBCAAoJEKeha0olJ0Nq708H/1j5vWw55YOnFamPeY/ArRjS U2PvNXpmlmsTPSLnbBT09jBzqhH2wqZzfrFbBWQd1TqPYFkcSfNhZLoWgnuG2SYo ogZXDtQkNAN9L51mwzbl4T0FLn7E56FkTHcVylt+cDcT+L5GnwZtFtYcD/7GTqf5 TxD1HZrRH4C8f0q8bn/YAaejz/p5yv2+spiiJ10QugYLGKrF9K29kHKGo5BXuqxA e/XhemleYgI9S2FX7wcYbjXOKZcIqKywtiXBJW0G7ZAyhmHjfeHL8xof+VEZzYEl Bbia4SRleslDzNPOfhJh/Co2qw/G9xluHRredv1EK6gYXsBSsKuIEZ8QrEGwzJw= =8Ek5 -----END PGP SIGNATURE----- --------------enigC6F198227BBBC7AFA75C060E--