From: Paolo Bonzini <pbonzini@redhat.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
qemu-devel@nongnu.org
Cc: stefanha@redhat.com, eblake@redhat.com, den@openvz.org
Subject: Re: [Qemu-devel] [PATCH v2 6/6] nbd: use generic trace subsystem instead of TRACE macro
Date: Thu, 6 Jul 2017 10:57:34 +0200 [thread overview]
Message-ID: <1caf5855-2119-e48a-329b-a266cc3f41e6@redhat.com> (raw)
In-Reply-To: <5aafa3cf-4ee1-f198-ce09-5c2d66e643cd@virtuozzo.com>
On 06/07/2017 10:45, Vladimir Sementsov-Ogievskiy wrote:
>>> +do_nbd_trip_read(uint32_t len) "Read %" PRIu32" byte(s)"
>> This one is good.
>
> why do you like this and do not like nbd_trip_write_zeros?
I'm not sure I understand: this one is after blk_pread returns. It
tells you that the socket is about to receive the payload.
For write, nothing special happened since do_nbd_trip_cmd_write.
For write zeroes, nothing special happened since
nbd_co_receive_request_decode_type.
>>
>>> +do_nbd_trip_cmd_write(void) "Request type is WRITE"
>>> +do_nbd_trip_cmd_write_readonly(void) "Server is read-only, return
>>> error"
>> These can be removed.
>
> I think the second is informative, isn't it?
Can you instead add a trace point at the beginning of nbd_co_send_reply,
with handle/error/len? Then you can remove do_nbd_trip_read and
do_nbd_trip_complete, too.
>>> +do_nbd_trip_write(void) "Writing to device"
>> Please add the handle here.
>
> handle will be printed in nbd_co_receive_request_decode_type..
You need it in case there are multiple requests in flight.
>>> +do_nbd_trip_cmd_write_zeroes(void) "Request type is WRITE_ZEROES"
>>> +do_nbd_trip_write_zeroes(void) "Writing to device"
>>> +do_nbd_trip_cmd_flush(void) "Request type is FLUSH"
>>> +do_nbd_trip_cmd_trim(void) "Request type is TRIM"
>> Can all be removed.
>
> then, remove nbd_trip_write too ?
Write is different because it happens after nbd_read(client->ioc,
req->data, request->len, NULL) has completed. You can add a tracepoint
to nbd_co_receive_request instead.
Paolo
next prev parent reply other threads:[~2017-07-06 8:57 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-21 15:34 [Qemu-devel] [PATCH v2 0/6] nbd refactoring part 2 Vladimir Sementsov-Ogievskiy
2017-06-21 15:34 ` [Qemu-devel] [PATCH v2 1/6] nbd/server: nbd_negotiate: return 1 on NBD_OPT_ABORT Vladimir Sementsov-Ogievskiy
2017-06-29 18:46 ` Eric Blake
2017-07-06 16:07 ` Eric Blake
2017-06-21 15:34 ` [Qemu-devel] [PATCH v2 2/6] nbd/server: use errp instead of LOG Vladimir Sementsov-Ogievskiy
2017-06-29 19:27 ` Eric Blake
2017-07-05 12:33 ` Vladimir Sementsov-Ogievskiy
2017-07-05 15:21 ` Paolo Bonzini
2017-07-05 17:38 ` Markus Armbruster
2017-07-07 14:40 ` Eric Blake
2017-07-07 15:10 ` Vladimir Sementsov-Ogievskiy
2017-06-21 15:34 ` [Qemu-devel] [PATCH v2 3/6] nbd/server: add errp to nbd_send_reply() Vladimir Sementsov-Ogievskiy
2017-06-29 19:31 ` Eric Blake
2017-06-21 15:34 ` [Qemu-devel] [PATCH v2 4/6] nbd/common: nbd_tls_handshake: remove extra TRACE Vladimir Sementsov-Ogievskiy
2017-06-29 19:32 ` Eric Blake
2017-06-21 15:34 ` [Qemu-devel] [PATCH v2 5/6] nbd/client: refactor TRACE of NBD_MAGIC Vladimir Sementsov-Ogievskiy
2017-06-29 19:36 ` Eric Blake
2017-07-05 15:21 ` Paolo Bonzini
2017-06-21 15:34 ` [Qemu-devel] [PATCH v2 6/6] nbd: use generic trace subsystem instead of TRACE macro Vladimir Sementsov-Ogievskiy
2017-06-29 20:12 ` Eric Blake
2017-07-06 14:49 ` Eric Blake
2017-07-05 15:29 ` Paolo Bonzini
2017-07-06 8:45 ` Vladimir Sementsov-Ogievskiy
2017-07-06 8:57 ` Paolo Bonzini [this message]
2017-07-06 15:01 ` Eric Blake
2017-07-06 15:28 ` Eric Blake
2017-07-06 15:44 ` Eric Blake
2017-07-07 14:02 ` 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=1caf5855-2119-e48a-329b-a266cc3f41e6@redhat.com \
--to=pbonzini@redhat.com \
--cc=den@openvz.org \
--cc=eblake@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
--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).