|
From: | Yajun Wu |
Subject: | Re: vhost-user-blk reconnect issue |
Date: | Wed, 10 Apr 2024 15:51:41 +0800 |
User-agent: | Mozilla Thunderbird |
External email: Use caution opening links or attachments
Hi,
I tested it today and there is indeed a problem in this scenario.It seems that the first version of the patch is the best and can handle all scenarios.With this patch, the previously merged patches are no longer useful.
I will revert this patch and submit a new fix. Do you have any comments?
Looks good to me.
Thanks,
Yajun
Thanks,Li
2024年4月1日 16:43,Yajun Wu <yajunw@nvidia.com> 写道:
On 4/1/2024 4:34 PM, Li Feng wrote:
External email: Use caution opening links or attachments
I think this fix is valid.
My tests are with this fix, failed in the two scenarios I mentioned.
Thanks,
Li
2024年4月1日 10:08,Yajun Wu <yajunw@nvidia.com> 写道:
On 3/27/2024 6:47 PM, Stefano Garzarella wrote:
External email: Use caution opening links or attachments
Hi Yajun,
On Mon, Mar 25, 2024 at 10:54:13AM +0000, Yajun Wu wrote:
Hi experts,Do you know if has it ever worked and so it's a regression, or have we
With latest QEMU (8.2.90), we find two vhost-user-blk backend reconnect
failure scenarios:
always had this problem?
I am afraid this commit: "71e076a07d (2022-12-01 02:30:13 -0500) hw/virtio: generalise CHR_EVENT_CLOSED handling" caused both failures. Previous hash is good.
I suspect the "if (vhost->vdev)" in vhost_user_async_close_bh is the cause, previous code doesn't have this check?
Thanks,
Stefano
1. Disconnect vhost-user-blk backend before guest driver probe vblk device, then reconnect backend after guest driver probe device. QEMU won't send out any vhost messages to restore backend.
This is because vhost->vdev is NULL before guest driver probe vblk device, so vhost_user_blk_disconnect won't be called, s->connected is still true. Next vhost_user_blk_connect will simply return without doing anything.
2. modprobe -r virtio-blk inside VM, then disconnect backend, then reconnect backend, then modprobe virtio-blk. QEMU won't send messages in vhost_dev_init.
This is because rmmod will let qemu call vhost_user_blk_stop, vhost->vdev also become NULL(in vhost_dev_stop), vhost_user_blk_disconnect won't be called. Again s->connected is still true, even chr connect is closed.
I think even vhost->vdev is NULL, vhost_user_blk_disconnect should be called when chr connect close?
Hope we can have a fix soon.
Thanks,
Yajun
[Prev in Thread] | Current Thread | [Next in Thread] |