diff options
author | Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> | 2019-10-09 11:41:57 +0300 |
---|---|---|
committer | Eric Blake <eblake@redhat.com> | 2019-10-22 09:22:07 -0500 |
commit | f7651539d80b3490207e94a494aa4b9b255edfdf (patch) | |
tree | 33b7dc6171ed95881744e7620d68c963d932238e /block/iscsi.c | |
parent | 3d692649d1702f9cbd00eca8542384f85663b9c7 (diff) |
block/nbd: nbd reconnect
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 <vsementsov@virtuozzo.com>
Message-Id: <20191009084158.15614-3-vsementsov@virtuozzo.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'block/iscsi.c')
0 files changed, 0 insertions, 0 deletions