From: Chrysostomos Nanakos <cnanakos@grnet.gr>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: "Benoît Canet" <benoit.canet@irqsave.net>,
"Chrysostomos Nanakos" <cnanakos@grnet.gr>,
pingfank@linux.vnet.ibm.com, famz@redhat.com, kroosec@gmail.com,
jan.kiszka@siemens.com, mjt@tls.msk.ru, qemu-devel@nongnu.org,
stefanha@redhat.com, sw@weilnetz.de, kwolf@redhat.com,
afaerber@suse.de, aliguori@amazon.com
Subject: Re: [Qemu-devel] [PATCH v2] async: aio_context_new(): Handle event_notifier_init failure
Date: Tue, 16 Sep 2014 18:43:30 +0300 [thread overview]
Message-ID: <20140916154330.GA4631@blackdevil> (raw)
In-Reply-To: <541841C5.8060100@redhat.com>
On Tue, Sep 16, 2014 at 03:57:25PM +0200, Paolo Bonzini wrote:
> Il 16/09/2014 15:53, Benoît Canet ha scritto:
> >> static void iothread_complete(UserCreatable *obj, Error **errp)
> >> > {
> >> > + Error *local_error = NULL;
> >> > IOThread *iothread = IOTHREAD(obj);
> >> >
> >> > iothread->stopping = false;
> >> > - iothread->ctx = aio_context_new();
> >> > + iothread->ctx = aio_context_new(&local_error);
> >> > + if (!iothread->ctx) {
> >> > + error_report("%s", error_get_pretty(local_error));
> >> > + error_report("Failed to create AIO context");
> > I think reporting one line is sufficient.
> >
> > You could do something in the vein of.
> > error_report("Failed to create AIO Context: \'%s\'", error_get_pretty(local_error));
> >
> >
> >> > + exit(1);
> > Also here I don't know if exiting in the middle of a class initialization
> > completion function is good taste.
> > You should ask to someone knowing QOM.
> >
>
> Indeed, the right thing to do is simply
>
> error_propagate(errp, local_error);
> return;
Just to note that after propagating the error and returning, QEMU fails
silently without printing the error message.
I will make the proposed changes and try to resolve this in the next patch
series if this is possible.
Regards,
Chrysostomos.
next prev parent reply other threads:[~2014-09-16 15:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-16 9:06 [Qemu-devel] [PATCH v2] async: aio_context_new(): Handle event_notifier_init failure Chrysostomos Nanakos
2014-09-16 9:06 ` Chrysostomos Nanakos
2014-09-16 13:53 ` Benoît Canet
2014-09-16 13:57 ` Paolo Bonzini
2014-09-16 15:43 ` Chrysostomos Nanakos [this message]
2014-09-16 15:45 ` Paolo Bonzini
2014-09-16 15:50 ` Chrysostomos Nanakos
2014-09-16 17:58 ` Chrysostomos Nanakos
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=20140916154330.GA4631@blackdevil \
--to=cnanakos@grnet.gr \
--cc=afaerber@suse.de \
--cc=aliguori@amazon.com \
--cc=benoit.canet@irqsave.net \
--cc=famz@redhat.com \
--cc=jan.kiszka@siemens.com \
--cc=kroosec@gmail.com \
--cc=kwolf@redhat.com \
--cc=mjt@tls.msk.ru \
--cc=pbonzini@redhat.com \
--cc=pingfank@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
--cc=sw@weilnetz.de \
/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).