From: Eric Blake <eblake@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>, qemu-devel@nongnu.org
Cc: kwolf@redhat.com, qemu-block@nongnu.org,
Jeff Cody <jcody@redhat.com>, Peter Lieven <pl@kamp.de>,
armbru@redhat.com, dgilbert@redhat.com
Subject: Re: [Qemu-devel] [PATCH RFC 3/3] block/nfs: switch to error_init_local
Date: Tue, 16 Jun 2015 09:08:16 -0600 [thread overview]
Message-ID: <55803BE0.7000206@redhat.com> (raw)
In-Reply-To: <1434458200-23440-4-git-send-email-mst@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1214 bytes --]
On 06/16/2015 06:53 AM, Michael S. Tsirkin wrote:
> We probably should just switch everyone, this is
> just to demonstrate the API usage.
>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> ---
> block/nfs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
And indeed this is the reason things are still at RFC level. I like the
idea. It doesn't change anything for a bug-free program, but where we
DO have a bug, we now get a stacktrace that aborts as soon as possible
rather than delaying to the propagation point and losing some information.
>
> diff --git a/block/nfs.c b/block/nfs.c
> index ca9e24e..de4b8c3 100644
> --- a/block/nfs.c
> +++ b/block/nfs.c
> @@ -385,7 +385,7 @@ static int nfs_file_open(BlockDriverState *bs, QDict *options, int flags,
> NFSClient *client = bs->opaque;
> int64_t ret;
> QemuOpts *opts;
> - Error *local_err = NULL;
> + Error *local_err = error_init_local(errp);
Should be a fairly mechanical patch to catch all the spots; although
there are multiple spellings (not all callers name it local_err).
--
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 --]
next prev parent reply other threads:[~2015-06-16 15:08 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-16 12:53 [Qemu-devel] [PATCH RFC 0/3] error: allow local errors to trigger abort Michael S. Tsirkin
2015-06-16 12:53 ` [Qemu-devel] [PATCH RFC 1/3] error: don't rely on pointer comparisons Michael S. Tsirkin
2015-06-16 14:45 ` Eric Blake
2015-06-16 14:49 ` Michael S. Tsirkin
2015-06-16 14:50 ` Eric Blake
2015-06-16 15:03 ` Eric Blake
2015-06-17 6:57 ` Michael S. Tsirkin
2015-06-17 9:11 ` Kevin Wolf
2015-06-16 12:53 ` [Qemu-devel] [PATCH RFC 2/3] error: allow local errors to trigger abort Michael S. Tsirkin
2015-06-16 15:06 ` Eric Blake
2015-06-16 12:53 ` [Qemu-devel] [PATCH RFC 3/3] block/nfs: switch to error_init_local Michael S. Tsirkin
2015-06-16 15:08 ` Eric Blake [this message]
2015-06-16 21:17 ` Michael S. Tsirkin
2015-06-17 14:26 ` [Qemu-devel] [PATCH RFC 0/3] error: allow local errors to trigger abort John Snow
2015-06-17 14:28 ` Michael S. Tsirkin
2015-06-17 14:29 ` Kevin Wolf
2015-06-17 14:30 ` John Snow
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=55803BE0.7000206@redhat.com \
--to=eblake@redhat.com \
--cc=armbru@redhat.com \
--cc=dgilbert@redhat.com \
--cc=jcody@redhat.com \
--cc=kwolf@redhat.com \
--cc=mst@redhat.com \
--cc=pl@kamp.de \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.