qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v10 2/3] block/nbd: nbd reconnect


From: Eric Blake
Subject: Re: [PATCH v10 2/3] block/nbd: nbd reconnect
Date: Wed, 16 Oct 2019 17:39:07 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.0

On 10/9/19 3:41 AM, Vladimir Sementsov-Ogievskiy wrote:
Implement reconnect. To achieve this:

1. add new modes:
    connecting-wait: means, that reconnecting is in progress, and there
      were small number of reconnect attempts, so all requests are
      waiting for the connection.
    connecting-nowait: reconnecting is in progress, there were a lot of
      attempts of reconnect, all requests will return errors.

    two old modes are used too:
    connected: normal state
    quit: exiting after fatal error or on close

Possible transitions are:

    * -> quit
    connecting-* -> connected
    connecting-wait -> connecting-nowait (transition is done after
                       reconnect-delay seconds in connecting-wait mode)
    connected -> connecting-wait

2. Implement reconnect in connection_co. So, in connecting-* mode,
     connection_co, tries to reconnect unlimited times.

3. Retry nbd queries on channel error, if we are in connecting-wait
     state.

Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
---
  block/nbd.c | 331 ++++++++++++++++++++++++++++++++++++++++++----------
  1 file changed, 268 insertions(+), 63 deletions(-)


Reviewed-by: Eric Blake <address@hidden>

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]