nbd: move connection code from block/nbd to nbd/client-connection
commit5276c87c12f4c2a2db0bf343f6d3092816f0afc6
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Tue, 15 Jun 2021 19:07:05 +0000 (15 14:07 -0500)
committerEric Blake <eblake@redhat.com>
Fri, 18 Jun 2021 15:59:53 +0000 (18 10:59 -0500)
treed051e4793693fce1a62f870a7bc507b24db0817c
parent248d4701989dbe8de1c06aa8f65ef38f289df87b
nbd: move connection code from block/nbd to nbd/client-connection

We now have bs-independent connection API, which consists of four
functions:

  nbd_client_connection_new()
  nbd_client_connection_release()
  nbd_co_establish_connection()
  nbd_co_establish_connection_cancel()

Move them to a separate file together with NBDClientConnection
structure which becomes private to the new API.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20210610100802.5888-18-vsementsov@virtuozzo.com>
[eblake: comment tweaks]
Signed-off-by: Eric Blake <eblake@redhat.com>
block/nbd.c
include/block/nbd.h
nbd/client-connection.c [new file with mode: 0644]
nbd/meson.build