Yes, I also think that realize shout be sync. But may be it's better to add an 'disconnected' option to init the chardev in disconnected state, then do the first connection with qemu_chr_fe_wait_connected from vhost_user_blk_realize. So when connection will be broken in realize we can try again. What do you think about it?
Regards, Yury 06.12.2018, 12:42, "Yongji Xie" <elohi...@gmail.com>: > On Thu, 6 Dec 2018 at 17:21, Yury Kotov <yury-ko...@yandex-team.ru> wrote: >> Hi, it's very interesting patchset. >> >> I also research reconnecting issue for vhost-user-blk and SPDK. >> Did you support a case when vhost backend is not started but QEMU does? > > Now we do not support this case. Because qemu have to get config from > vhost-user > backend through VHOST_USER_GET_CONFIG when we initialize the > vhost-user-blk device. > > If we delay getting config until we connect vhost-user backend, guest > driver may get incorrect > configuration? That's why I modify the "wait" option to support client mode. > > Thanks, > Yongji