[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 32/41] nbd: Don't bother tracing an NBD_OPT_ABORT res
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 32/41] nbd: Don't bother tracing an NBD_OPT_ABORT response failure |
Date: |
Thu, 13 Jul 2017 16:24:25 +0200 |
From: Eric Blake <address@hidden>
We really don't care if our spec-compliant reply to NBD_OPT_ABORT
was received, so shave off some lines of code by not even tracing it.
Signed-off-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
nbd/server.c | 15 ++++-----------
nbd/trace-events | 1 -
2 files changed, 4 insertions(+), 12 deletions(-)
diff --git a/nbd/server.c b/nbd/server.c
index 9b0c588..e15385b 100644
--- a/nbd/server.c
+++ b/nbd/server.c
@@ -376,7 +376,6 @@ static int nbd_negotiate_options(NBDClient *client, Error
**errp)
{
uint32_t flags;
bool fixedNewstyle = false;
- Error *local_err = NULL;
/* Client sends:
[ 0 .. 3] client flags
@@ -479,7 +478,9 @@ static int nbd_negotiate_options(NBDClient *client, Error
**errp)
if (ret < 0) {
return ret;
}
- /* Let the client keep trying, unless they asked to quit */
+ /* Let the client keep trying, unless they asked to
+ * quit. In this mode, we've already sent an error, so
+ * we can't ack the abort. */
if (option == NBD_OPT_ABORT) {
return 1;
}
@@ -498,15 +499,7 @@ static int nbd_negotiate_options(NBDClient *client, Error
**errp)
/* NBD spec says we must try to reply before
* disconnecting, but that we must also tolerate
* guests that don't wait for our reply. */
- nbd_negotiate_send_rep(client->ioc, NBD_REP_ACK, option,
- &local_err);
-
- if (local_err != NULL) {
- const char *error = error_get_pretty(local_err);
- trace_nbd_opt_abort_reply_failed(error);
- error_free(local_err);
- }
-
+ nbd_negotiate_send_rep(client->ioc, NBD_REP_ACK, option, NULL);
return 1;
case NBD_OPT_EXPORT_NAME:
diff --git a/nbd/trace-events b/nbd/trace-events
index 4b233b8..c6f898e 100644
--- a/nbd/trace-events
+++ b/nbd/trace-events
@@ -40,7 +40,6 @@ nbd_negotiate_options_newstyle(void) "Client supports fixed
newstyle handshake"
nbd_negotiate_options_no_zeroes(void) "Client supports no zeroes at handshake
end"
nbd_negotiate_options_check_magic(uint64_t magic) "Checking opts magic 0x%"
PRIx64
nbd_negotiate_options_check_option(uint32_t option) "Checking option 0x%"
PRIx32
-nbd_opt_abort_reply_failed(const char *error) "Reply to NBD_OPT_ABORT request
failed: %s"
nbd_negotiate_begin(void) "Beginning negotiation"
nbd_negotiate_old_style(uint64_t size, unsigned flags) "advertising size %"
PRIu64 " and flags %x"
nbd_negotiate_new_style_size_flags(uint64_t size, unsigned flags) "advertising
size %" PRIu64 " and flags %x"
--
1.8.3.1
- [Qemu-devel] [PULL 09/41] char: add backend hotswap handler, (continued)
- [Qemu-devel] [PULL 09/41] char: add backend hotswap handler, Paolo Bonzini, 2017/07/13
- [Qemu-devel] [PULL 11/41] char: forbid direct chardevice access for hotswap devices, Paolo Bonzini, 2017/07/13
- [Qemu-devel] [PULL 18/41] virtio-console: chardev hotswap support, Paolo Bonzini, 2017/07/13
- [Qemu-devel] [PULL 20/41] serial: chardev hotswap support, Paolo Bonzini, 2017/07/13
- [Qemu-devel] [PULL 22/41] Revert "exec.c: Fix breakpoint invalidation race", Paolo Bonzini, 2017/07/13
- [Qemu-devel] [PULL 24/41] gdbstub: modernise DEBUG_GDB, Paolo Bonzini, 2017/07/13
- [Qemu-devel] [PULL 26/41] qom/cpu: remove host_tid field, Paolo Bonzini, 2017/07/13
- [Qemu-devel] [PULL 29/41] memory/iommu: QOM'fy IOMMU MemoryRegion, Paolo Bonzini, 2017/07/13
- [Qemu-devel] [PULL 30/41] memory/iommu: introduce IOMMUMemoryRegionClass, Paolo Bonzini, 2017/07/13
- [Qemu-devel] [PULL 31/41] nbd: Create struct for tracking export info, Paolo Bonzini, 2017/07/13
- [Qemu-devel] [PULL 32/41] nbd: Don't bother tracing an NBD_OPT_ABORT response failure,
Paolo Bonzini <=
- [Qemu-devel] [PULL 33/41] nbd: Expose and debug more NBD constants, Paolo Bonzini, 2017/07/13
- [Qemu-devel] [PULL 39/41] nbd: Implement NBD_INFO_BLOCK_SIZE on client, Paolo Bonzini, 2017/07/13
- [Qemu-devel] [PULL 38/41] nbd: Implement NBD_INFO_BLOCK_SIZE on server, Paolo Bonzini, 2017/07/13
- [Qemu-devel] [PULL 37/41] nbd: Implement NBD_OPT_GO on client, Paolo Bonzini, 2017/07/13
- [Qemu-devel] [PULL 40/41] vl: fix breakage of -tb-size, Paolo Bonzini, 2017/07/13
- Re: [Qemu-devel] [PULL 00/41] Misc patches for QEMU 2.10 soft freeze, no-reply, 2017/07/13