[PATCH v2 08/25] vhost-user-blk: vhost_user_blk_connect(): call vhost_dev_connect()

Vladimir Sementsov-Ogievskiy posted 25 patches 4 weeks, 1 day ago
[PATCH v2 08/25] vhost-user-blk: vhost_user_blk_connect(): call vhost_dev_connect()
Posted by Vladimir Sementsov-Ogievskiy 4 weeks, 1 day ago
Call vhost_dev_connect() directly, to simplify further refactoring.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
---
 hw/block/vhost-user-blk.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/hw/block/vhost-user-blk.c b/hw/block/vhost-user-blk.c
index 57214a69cd..f2ecf81e4d 100644
--- a/hw/block/vhost-user-blk.c
+++ b/hw/block/vhost-user-blk.c
@@ -363,7 +363,12 @@ static int vhost_user_blk_connect(DeviceState *dev, Error **errp)
 
     s->vhost_user.supports_config = true;
     ret = vhost_dev_init(&s->dev, &s->vhost_user, VHOST_BACKEND_TYPE_USER, 0,
-                         true, errp);
+                         false, errp);
+    if (ret < 0) {
+        return ret;
+    }
+
+    ret = vhost_dev_connect(&s->dev, errp);
     if (ret < 0) {
         return ret;
     }
-- 
2.48.1
Re: [PATCH v2 08/25] vhost-user-blk: vhost_user_blk_connect(): call vhost_dev_connect()
Posted by Raphael Norwitz 3 weeks, 3 days ago
Reviewed-by: Raphael Norwitz <raphael.s.norwitz@gmail.com>

On Thu, Oct 16, 2025 at 7:46 AM Vladimir Sementsov-Ogievskiy
<vsementsov@yandex-team.ru> wrote:
>
> Call vhost_dev_connect() directly, to simplify further refactoring.
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
> ---
>  hw/block/vhost-user-blk.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/hw/block/vhost-user-blk.c b/hw/block/vhost-user-blk.c
> index 57214a69cd..f2ecf81e4d 100644
> --- a/hw/block/vhost-user-blk.c
> +++ b/hw/block/vhost-user-blk.c
> @@ -363,7 +363,12 @@ static int vhost_user_blk_connect(DeviceState *dev, Error **errp)
>
>      s->vhost_user.supports_config = true;
>      ret = vhost_dev_init(&s->dev, &s->vhost_user, VHOST_BACKEND_TYPE_USER, 0,
> -                         true, errp);
> +                         false, errp);
> +    if (ret < 0) {
> +        return ret;
> +    }
> +
> +    ret = vhost_dev_connect(&s->dev, errp);
>      if (ret < 0) {
>          return ret;
>      }
> --
> 2.48.1
>
>