From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33112) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMzoo-00045E-JL for qemu-devel@nongnu.org; Tue, 12 Jul 2016 11:41:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bMzoj-0008HW-2E for qemu-devel@nongnu.org; Tue, 12 Jul 2016 11:41:53 -0400 References: <1468323255-20454-1-git-send-email-caoj.fnst@cn.fujitsu.com> From: Eric Blake Message-ID: <57850FB6.3000403@redhat.com> Date: Tue, 12 Jul 2016 09:41:42 -0600 MIME-Version: 1.0 In-Reply-To: <1468323255-20454-1-git-send-email-caoj.fnst@cn.fujitsu.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="WpHEoDsegLpHSHr4JQn7s4ENkO5U6T49a" Subject: Re: [Qemu-devel] [PATCH] aio-posix: fill error message that is missed List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cao jin , qemu-devel@nongnu.org Cc: famz@redhat.com, qemu-block@nongnu.org, stefanha@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --WpHEoDsegLpHSHr4JQn7s4ENkO5U6T49a From: Eric Blake To: Cao jin , qemu-devel@nongnu.org Cc: famz@redhat.com, qemu-block@nongnu.org, stefanha@redhat.com Message-ID: <57850FB6.3000403@redhat.com> Subject: Re: [Qemu-devel] [PATCH] aio-posix: fill error message that is missed References: <1468323255-20454-1-git-send-email-caoj.fnst@cn.fujitsu.com> In-Reply-To: <1468323255-20454-1-git-send-email-caoj.fnst@cn.fujitsu.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 07/12/2016 05:34 AM, Cao jin wrote: > The current judegement of caller is meaningless, make it useful. Is this something you can trigger? If so, what command line? If not, how did you find it? Spelled 'judgment', not 'judegement'; but rather than just fixing the typo, it might read better as: The lone caller of aio_context_setup() only checks whether an error was set, but aio_context_setup() is not setting an error. >=20 > Signed-off-by: Cao jin > --- > aio-posix.c | 2 ++ > 1 file changed, 2 insertions(+) >=20 > diff --git a/aio-posix.c b/aio-posix.c > index 6006122..8b0deb7 100644 > --- a/aio-posix.c > +++ b/aio-posix.c > @@ -18,6 +18,7 @@ > #include "block/block.h" > #include "qemu/queue.h" > #include "qemu/sockets.h" > +#include "qapi/error.h" > #ifdef CONFIG_EPOLL_CREATE1 > #include > #endif > @@ -491,6 +492,7 @@ void aio_context_setup(AioContext *ctx, Error **err= p) > assert(!ctx->epollfd); > ctx->epollfd =3D epoll_create1(EPOLL_CLOEXEC); > if (ctx->epollfd =3D=3D -1) { > + error_setg_errno(errp, errno, "Failed to create epoll instance= "); > ctx->epoll_available =3D false; > } else { > ctx->epoll_available =3D true; However, I'm not even sure your patch is right. The mere fact that we have ctx->epoll_available makes it sound like we WANT to be able to gracefully fall back when epoll is not available, rather than raising an error message. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --WpHEoDsegLpHSHr4JQn7s4ENkO5U6T49a Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJXhQ+2AAoJEKeha0olJ0Nqv0EH/30/CFLepYOzl7ao47g1O52d VlEejYGTIuTmq/XsUMSfwdgw1HzsQ1wsBswvb1ZMsbDl/TS1si7H6Rwtgnhldm8l Azras4g9bW40oJh/M3kv/gzNIsSnnGYV6LlWNg9jMb6EDLBuGoeUwVAhrVTL/rpL 7IjPF9Um5pgwfbcTWsVj7A/tudo9mLy+n8dIwtosfAj8gk3k/Ss0d8HrSKjIKmjZ Rq4b/UHZqSPv1OGmuXlLTsND9dgD9dxCLjh58rvkPAng7eABm+15KEqVNB1TIDTA zhJR4Z71dkeB/KSe3DODy7lZXiEA3Fw9fOGhO1IEPr99dADhT+G5gzP99upwO2Y= =oC+W -----END PGP SIGNATURE----- --WpHEoDsegLpHSHr4JQn7s4ENkO5U6T49a--