diff options
author | Eric Blake <eblake@redhat.com> | 2017-07-07 15:30:42 -0500 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2017-07-14 12:04:41 +0200 |
commit | 37ec36f622d46b7d13421533efe686af2326771e (patch) | |
tree | 8f1225767da146401a431489b250e2c5a6e87e18 /nbd/server.c | |
parent | 004a89fce9b5ec1b027bf4d104d83aa682db7b7a (diff) |
nbd: Don't bother tracing an NBD_OPT_ABORT response failure
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 <eblake@redhat.com>
Message-Id: <20170707203049.534-3-eblake@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'nbd/server.c')
-rw-r--r-- | nbd/server.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/nbd/server.c b/nbd/server.c index 9b0c588146..e15385b777 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: |