qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Cao jin <caoj.fnst@cn.fujitsu.com>, qemu-devel@nongnu.org
Cc: famz@redhat.com, qemu-block@nongnu.org, stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH] aio-posix: fill error message that is missed
Date: Tue, 12 Jul 2016 09:41:42 -0600	[thread overview]
Message-ID: <57850FB6.3000403@redhat.com> (raw)
In-Reply-To: <1468323255-20454-1-git-send-email-caoj.fnst@cn.fujitsu.com>

[-- Attachment #1: Type: text/plain, Size: 1607 bytes --]

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.

> 
> Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com>
> ---
>  aio-posix.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> 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 <sys/epoll.h>
>  #endif
> @@ -491,6 +492,7 @@ void aio_context_setup(AioContext *ctx, Error **errp)
>      assert(!ctx->epollfd);
>      ctx->epollfd = epoll_create1(EPOLL_CLOEXEC);
>      if (ctx->epollfd == -1) {
> +        error_setg_errno(errp, errno, "Failed to create epoll instance");
>          ctx->epoll_available = false;
>      } else {
>          ctx->epoll_available = 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.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

  reply	other threads:[~2016-07-12 15:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-12 11:34 [Qemu-devel] [PATCH] aio-posix: fill error message that is missed Cao jin
2016-07-12 15:41 ` Eric Blake [this message]
2016-07-13  1:33   ` Fam Zheng
2016-07-13  1:55     ` Cao jin
2016-07-13  1:42   ` Cao jin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=57850FB6.3000403@redhat.com \
    --to=eblake@redhat.com \
    --cc=caoj.fnst@cn.fujitsu.com \
    --cc=famz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).