nbd/client: fix nbd_opt_go
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Fri, 4 Aug 2017 15:14:24 +0000 (18:14 +0300)
committerEric Blake <eblake@redhat.com>
Wed, 30 Aug 2017 18:00:38 +0000 (13:00 -0500)
Do not send NBD_OPT_ABORT to the broken server. After sending
NBD_REP_ACK on NBD_OPT_GO server is most probably in transmission
phase, when option sending is finished.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20170804151440.320927-2-vsementsov@virtuozzo.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
nbd/client.c

index 0a17de80b51f619b3ef14bb524b26e9170a14fbe..f1c16b588ff98ecac333f4342ba58b52f04680cc 100644 (file)
@@ -399,12 +399,10 @@ static int nbd_opt_go(QIOChannel *ioc, const char *wantname,
                phase, but make sure it sent flags */
             if (len) {
                 error_setg(errp, "server sent invalid NBD_REP_ACK");
-                nbd_send_opt_abort(ioc);
                 return -1;
             }
             if (!info->flags) {
                 error_setg(errp, "broken server omitted NBD_INFO_EXPORT");
-                nbd_send_opt_abort(ioc);
                 return -1;
             }
             trace_nbd_opt_go_success();