From: Eric Blake <eblake@redhat.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
qemu-devel@nongnu.org, qemu-block@nongnu.org
Cc: kwolf@redhat.com, armbru@redhat.com, mdroth@linux.vnet.ibm.com,
mreitz@redhat.com, den@openvz.org, pbonzini@redhat.com
Subject: Re: [Qemu-devel] [PATCH 3/3] block/nbd-client: use traces instead of noisy error_report_err
Date: Tue, 18 Dec 2018 16:14:45 -0600 [thread overview]
Message-ID: <1f4b1812-48c0-2ad6-cddc-0f3c09cb1fb2@redhat.com> (raw)
In-Reply-To: <48002129-16ef-f0ad-2701-893fc88ecdd0@redhat.com>
On 12/18/18 3:23 PM, Eric Blake wrote:
> On 11/2/18 10:11 AM, Vladimir Sementsov-Ogievskiy wrote:
>> Reduce extra noise of nbd-client, change 083 correspondingly.
>
> This says what, but not why. The details from the cover letter are
> important to include here, namely:
>
>> It was discussed, that error messages, produced by error_reprt_err's,
>> added in f140e300 are
>> 1. not really needed
>> 2. subject to race conditions
>>
>> And it was decided to drop them (switch to trace-points), look thread
>> https://lists.gnu.org/archive/html/qemu-devel/2018-08/msg00833.html
>>
>> So, I've also dropped error_report_err, added earlier in be41c100c0d
>> and later in 78a33ab5878.
>
>> @@ -79,7 +81,9 @@ static coroutine_fn void nbd_read_reply_entry(void
>> *opaque)
>> assert(s->reply.handle == 0);
>> ret = nbd_receive_reply(s->ioc, &s->reply, &local_err);
>> if (local_err) {
>> - error_report_err(local_err);
>> + trace_nbd_read_reply_entry_fail(ret,
>> error_get_pretty(local_err),
>> + error_get_hint(local_err)
>> ?: "");
>
> I'm not sold on the error hint being useful in the trace message. For
> that matter, even error_get_pretty() seems like it might be rather verbose.
>
> I do see why you are trying it, though: in nbd/client.c,
> nbd_handle_reply_err(), we have:
Actually, on looking further, the ONLY use of error_append_hint() in
nbd/client.c is when handling NBD_OPT_ which is synchronous when first
establishing the connection; but all of the additions of trace_nbd_*
calls in this file occur during transmission phase, where we don't have
any hints appended. I could NOT trigger any error path where a hint
would be present in the first place (although I will admit that I may
have missed a spot in my tracing).
> But instead of trying to make all the tracepoints in block/nbd-client.c
> extract this information, we could just improve nbd/client.c to have a
> tracepoint for any server-received error message at the same point where
> it calls error_append_hint().
>
This part is still true, even if it is no longer relevant to this patch.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
next prev parent reply other threads:[~2018-12-18 22:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-02 15:11 [Qemu-devel] [PATCH 0/3] nbd-client: drop extra error noise Vladimir Sementsov-Ogievskiy
2018-11-02 15:11 ` [Qemu-devel] [PATCH 1/3] error: add error_get_hint Vladimir Sementsov-Ogievskiy
2018-12-18 20:50 ` Eric Blake
2018-11-02 15:11 ` [Qemu-devel] [PATCH 2/3] nbd: publish _lookup functions Vladimir Sementsov-Ogievskiy
2018-12-18 20:53 ` Eric Blake
2018-11-02 15:11 ` [Qemu-devel] [PATCH 3/3] block/nbd-client: use traces instead of noisy error_report_err Vladimir Sementsov-Ogievskiy
2018-12-18 21:23 ` Eric Blake
2018-12-18 22:14 ` Eric Blake [this message]
2018-12-12 8:56 ` [Qemu-devel] ping Re: [PATCH 0/3] nbd-client: drop extra error noise Vladimir Sementsov-Ogievskiy
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=1f4b1812-48c0-2ad6-cddc-0f3c09cb1fb2@redhat.com \
--to=eblake@redhat.com \
--cc=armbru@redhat.com \
--cc=den@openvz.org \
--cc=kwolf@redhat.com \
--cc=mdroth@linux.vnet.ibm.com \
--cc=mreitz@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=vsementsov@virtuozzo.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).