From: Max Reitz <mreitz@redhat.com>
To: Fam Zheng <famz@redhat.com>, qemu-devel@nongnu.org
Cc: kwolf@redhat.com, stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH v2] mirror: drop local_err in mirror_complete
Date: Wed, 16 Oct 2013 20:56:49 +0200 [thread overview]
Message-ID: <525EE171.20208@redhat.com> (raw)
In-Reply-To: <1381803804-4551-1-git-send-email-famz@redhat.com>
On 2013-10-15 04:23, Fam Zheng wrote:
> There is errp passed in, so no need for local_err and error_propagate.
> Also drop the backing_filename which is set but unused since 34b5d2c.
I approve of dropping the backing_filename code, but I don't know if I
like removing the error_propagate.
I personally like explicit error_propagate calls in every function
receiving an error code from an underlying function and propagating that
as its own. There are two reasons for this:
The first reason is pragmatic: There are lots of places in qemu where
this is done exactly that way. In fact, I'm responsible for some myself.
"Fixing" all of them is basically impossible and also unreasonable,
since the worst error_propagate can do is blow up the code size.
However, this is not the reason I'd object a patch doing something
different (here: dropping the unused backing_filename code) and dropping
"redundant" error_propagate calls along the way.
The reason I object it here is that error_propagate *currently* is a
no-op. But this may change in the future: I have already sent an RFC
which extends error_propagate so it can generate an error backtrace if
enabled through configure. If this (or something similar which extends
error_propagate to do more than basically just *errp = local_err) is
merged to/implemented in qemu later on, I believe we want to call
error_propagate in every function that touches an error variable in
order to generate a backtrace with maximum verbosity.
Max
next prev parent reply other threads:[~2013-10-16 18:57 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-15 2:23 [Qemu-devel] [PATCH v2] mirror: drop local_err in mirror_complete Fam Zheng
2013-10-15 3:05 ` Eric Blake
2013-10-15 3:12 ` Fam Zheng
2013-10-16 18:56 ` Max Reitz [this message]
2013-10-17 12:49 ` Stefan Hajnoczi
2013-10-17 13:00 ` Kevin Wolf
2013-10-18 8:51 ` Fam Zheng
2013-10-18 17:59 ` Max Reitz
2013-10-19 8:05 ` Kevin Wolf
2013-10-19 20:02 ` Max Reitz
2013-10-19 8:50 ` Paolo Bonzini
2013-10-18 8:52 ` Stefan Hajnoczi
2013-10-17 12:51 ` Stefan Hajnoczi
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=525EE171.20208@redhat.com \
--to=mreitz@redhat.com \
--cc=famz@redhat.com \
--cc=kwolf@redhat.com \
--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).