On 6/5/19 5:39 PM, Eric Blake wrote: > On 6/5/19 5:09 AM, Vladimir Sementsov-Ogievskiy wrote: >> Enable keepalive option to track server availablity. > s/availablity/availability/ > > Do we want this unconditionally, or should it be an option (and hence > exposed over QMP)? That is good question, if we would expose it, we should specify timeout duration as an option. Though IMHO it would be safe to get this unconditional.
>> Requested-by: Denis V. Lunev <d...@openvz.org> >> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsement...@virtuozzo.com> >> --- >> block/nbd-client.c | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/block/nbd-client.c b/block/nbd-client.c >> index 790ecc1ee1..b57cea8482 100644 >> --- a/block/nbd-client.c >> +++ b/block/nbd-client.c >> @@ -1137,6 +1137,7 @@ static int nbd_client_connect(BlockDriverState *bs, >> >> /* NBD handshake */ >> logout("session init %s\n", export); >> + qio_channel_set_keepalive(QIO_CHANNEL(sioc), true, NULL); >> qio_channel_set_blocking(QIO_CHANNEL(sioc), true, NULL); >> >> client->info.request_sizes = true; >>