vhost-user-blk: Factor out vhost_user_blk_realize_connect()
authorKevin Wolf <kwolf@redhat.com>
Wed, 9 Jun 2021 15:46:57 +0000 (08:46 -0700)
committerKevin Wolf <kwolf@redhat.com>
Wed, 30 Jun 2021 11:19:08 +0000 (13:19 +0200)
commit415fc2940b1536061c904bf192e097c27d3a787b
treebbe27cb607bae7da9f102638104d871592ace5c1
parent50de51387f3fda9d3da049d60f8b631164f11f08
vhost-user-blk: Factor out vhost_user_blk_realize_connect()

This function is the part that we will want to retry if the connection
is lost during initialisation, so factor it out to keep the following
patch simpler.

The error path for vhost_dev_get_config() forgot disconnecting the
chardev, add this while touching the code.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20210609154658.350308-7-kwolf@redhat.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Reviewed-by: Raphael Norwitz <raphael.norwitz@nutanix.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
hw/block/vhost-user-blk.c