diff options
author | Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> | 2019-06-18 14:43:22 +0300 |
---|---|---|
committer | Eric Blake <eblake@redhat.com> | 2019-08-15 13:22:14 -0500 |
commit | a34b1e5e06de777c0faaa78694c4e0775b2bef0c (patch) | |
tree | 4af65ffa1961f64ecf7ab84185ff1517116b042e /memory.c | |
parent | a8e2bb6a76c7c661c117327f70f06eb628554230 (diff) |
block/nbd: move from quit to state
To implement reconnect we need several states for the client:
CONNECTED, QUIT and two different CONNECTING states. CONNECTING states
will be added in the following patches. This patch implements CONNECTED
and QUIT.
QUIT means, that we should close the connection and fail all current
and further requests (like old quit = true).
CONNECTED means that connection is ok, we can send requests (like old
quit = false).
For receiving loop we use a comparison of the current state with QUIT,
because reconnect will be in the same loop, so it should be looping
until the end.
Opposite, for requests we use a comparison of the current state with
CONNECTED, as we don't want to send requests in future CONNECTING
states.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20190618114328.55249-4-vsementsov@virtuozzo.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'memory.c')
0 files changed, 0 insertions, 0 deletions