Eric Blake
c688e6ca7b
nbd/client: Send NBD_CMD_DISC if open fails after connect
...
If nbd_client_init() fails after we are already connected,
then the server will spam logs with:
Disconnect client, due to: Unexpected end-of-file before all bytes were read
unless we gracefully disconnect before closing the connection.
Ways to trigger this:
$ opts=driver=nbd,export=foo,server.type=inet,server.host=localhost,server.port=10809
$ qemu-img map --output=json --image-opts $opts,read-only=off
$ qemu-img map --output=json --image-opts $opts,x-dirty-bitmap=nosuch:
Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <20181130023232.3079982-4-eblake@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
2018-11-30 14:13:37 -06:00
..
2018-03-19 14:58:37 -05:00
2018-08-31 16:28:33 +02:00
2018-07-28 09:09:58 +02:00
2018-07-10 16:01:52 +02:00
2018-09-25 17:26:18 +02:00
2018-07-28 09:09:58 +02:00
2018-11-12 17:49:21 +01:00
2018-11-05 15:09:55 +01:00
2018-11-05 15:09:55 +01:00
2018-09-25 15:31:15 +02:00
2018-08-15 12:50:39 +02:00
2018-08-31 16:28:33 +02:00
2018-08-15 12:50:39 +02:00
2018-06-29 14:20:56 +02:00
2018-11-05 15:09:55 +01:00
2018-10-29 16:23:17 -04:00
2016-10-07 14:14:06 +02:00
2018-11-05 15:09:55 +01:00
2017-12-18 17:07:02 +03:00
2018-11-19 14:32:01 +01:00
2018-07-10 16:01:51 +02:00
2018-11-05 15:09:55 +01:00
2018-09-25 15:50:15 +02:00
2018-02-09 13:52:16 +01:00
2018-11-05 15:09:55 +01:00
2018-09-25 15:50:15 +02:00
2018-11-12 17:49:21 +01:00
2018-09-25 15:31:15 +02:00
2018-11-30 14:13:37 -06:00
2018-07-02 15:27:38 -05:00
2018-07-28 09:09:58 +02:00
2018-06-29 14:20:56 +02:00
2018-08-15 12:50:39 +02:00
2018-10-12 09:46:14 +08:00
2018-06-29 14:20:56 +02:00
2018-02-09 05:05:11 +01:00
2018-08-15 12:50:39 +02:00
2018-11-05 15:09:54 +01:00
2018-02-13 17:00:00 +01:00
2018-06-29 14:20:56 +02:00
2018-11-19 12:51:40 +01:00
2018-05-31 04:16:06 +03:00
2018-11-05 15:09:54 +01:00
2018-11-19 12:51:40 +01:00
2018-11-05 15:09:54 +01:00
2018-03-09 15:17:47 +01:00
2017-07-17 11:34:11 +08:00
2017-07-17 11:34:11 +08:00
2018-03-09 15:17:47 +01:00
2018-10-19 14:51:34 +02:00
2017-07-17 11:34:11 +08:00
2018-11-05 15:09:54 +01:00
2018-08-15 12:50:39 +02:00
2018-11-05 15:09:55 +01:00
2018-06-29 14:20:56 +02:00
2018-10-19 14:51:34 +02:00
2018-08-15 12:50:39 +02:00
2018-06-29 14:20:56 +02:00
2018-09-25 15:31:15 +02:00
2018-08-15 12:50:39 +02:00
2018-07-10 16:01:52 +02:00
2018-07-10 16:01:52 +02:00
2018-11-05 15:28:48 +01:00
2018-11-05 15:09:54 +01:00
2018-11-05 15:09:54 +01:00
2018-11-05 15:09:54 +01:00
2018-11-05 15:09:54 +01:00
2018-09-26 10:47:18 +08:00
2018-11-05 15:09:54 +01:00
2018-11-19 12:51:40 +01:00
2018-06-15 14:49:44 +02:00
2018-05-15 16:11:41 +02:00
2018-08-28 18:21:38 +02:00