ing in
subsequent reconnection not being executed.
The next patch will completely fix this issue with a better approach.
Signed-off-by: Li Feng
---
hw/block/vhost-user-blk.c | 2 +-
hw/scsi/vhost-user-scsi.c | 3 +--
hw/virtio/vhost-user-base.c| 2 +-
hw/virtio/vhost-use
his issue, including vhost-user-blk/scsi.
Fixes: 71e076a07d ("hw/virtio: generalise CHR_EVENT_CLOSED handling")
Signed-off-by: Li Feng
---
hw/block/vhost-user-blk.c | 3 ++-
hw/scsi/vhost-user-scsi.c | 3 ++-
hw/virtio/vhost-user-base.c | 3 ++-
hw/virtio/vhost-user.c | 10
> 2024年5月15日 23:47,Raphael Norwitz 写道:
>
> The case your describing makes sense but now I have some concerns on
> the vhost_dev_cleanup bit.
>
> On Wed, May 15, 2024 at 1:47 AM Li Feng <mailto:fen...@smartx.com>> wrote:
>>
>>
>>
>>&g
> 2024年5月14日 21:58,Raphael Norwitz 写道:
>
> Code looks good. Just a question on the error case you're trying to fix.
>
> On Tue, May 14, 2024 at 2:12 AM Li Feng wrote:
>>
>> When the vhost-user is reconnecting to the backend, and if the vhost-user
>
> 2024年5月14日 21:58,Raphael Norwitz 写道:
>
> The code for these two patches looks fine. Just some questions on the
> failure case you're trying to fix.
>
>
> On Tue, May 14, 2024 at 2:12 AM Li Feng wrote:
>>
>> This reverts commit f02a4b8e6431598612466
ing in
subsequent reconnection not being executed.
The next patch will completely fix this issue with a better approach.
Signed-off-by: Li Feng
---
hw/block/vhost-user-blk.c | 2 +-
hw/scsi/vhost-user-scsi.c | 3 +--
hw/virtio/vhost-user-base.c| 2 +-
hw/virtio/vhost-use
false.
At this time, the event handler will be cleared. We need to ensure that the
event handler can remain installed.
All vhost-user devices have this issue, including vhost-user-blk/scsi.
Fixes: 71e076a07d ("hw/virtio: generalise CHR_EVENT_CLOSED handling")
Signed-off-by: Li Feng
---
hw/
This reverts commit f02a4b8e6431598612466f76aac64ab492849abf.
Signed-off-by: Li Feng
---
hw/block/vhost-user-blk.c | 2 +-
hw/scsi/vhost-user-scsi.c | 3 +--
hw/virtio/vhost-user-base.c| 2 +-
hw/virtio/vhost-user.c | 10 ++
include/hw/virtio/vhost-user.h | 3
false.
At this time, the event handler will be cleared. We need to ensure that the
event handler can remain installed.
All vhost-user devices have this issue, including vhost-user-blk/scsi.
Fixes: 71e076a07d ("hw/virtio: generalise CHR_EVENT_CLOSED handling")
Signed-off-by: Li Feng
---
hw/
Fixes: 71e076a07d ("hw/virtio: generalise CHR_EVENT_CLOSED handling")
Signed-off-by: Li Feng
---
hw/virtio/vhost-user.c | 10 +-
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c
index c929097e87..c407ea8939 100644
--- a/hw/vir
This reverts commit f02a4b8e6431598612466f76aac64ab492849abf.
Signed-off-by: Li Feng
---
hw/block/vhost-user-blk.c | 2 +-
hw/scsi/vhost-user-scsi.c | 3 +--
hw/virtio/vhost-user-base.c| 2 +-
hw/virtio/vhost-user.c | 10 ++
include/hw/virtio/vhost-user.h | 3
Previous discussion here:
https://lore.kernel.org/all/f86d6159-5610-476c-a69e-cd3a717f9...@nvidia.com/
The merged version cannot fully cover all possible scenarios. Here we revert
the previous
fixes and then use new methods to fix them.
Li Feng (2):
Revert "vhost-user: fix lost reco
comments?
Revert:
https://lore.kernel.org/all/a68c0148e9bf105f9e83ff5e763b8fcb6f7ba9be.1697644299.git@redhat.com/
New: https://lore.kernel.org/all/20230804052954.2918915-2-fen...@smartx.com/
Thanks,
Li
> 2024年4月1日 16:43,Yajun Wu 写道:
>
>
>
> On 4/1/2024 4:34 PM, Li Feng wrote:
Hi yajun,
I have submitted a patch to fix this problem a few months ago, but in the end
this solution was not accepted and other solutions
were adopted to fix it.
https://lore.kernel.org/all/20230804052954.2918915-2-fen...@smartx.com/
This is the merged fix:
> On Dec 14, 2023, at 08:31, Dongli Zhang wrote:
>
> It is required to use error_report() instead of error_reportf_err(), if the
> prior function does not take local_err as the argument. As a result, the
> local_err is always NULL and segment fault may happen.
>
> vhost_scsi_start()
> ->
Keep it the same to vhost-user-blk.
At the same time, fix the vhost_reset_device.
Signed-off-by: Li Feng
---
hw/scsi/vhost-user-scsi.c | 16
hw/virtio/virtio.c| 2 +-
2 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/hw/scsi/vhost-user-scsi.c b/hw/scsi
Li Feng (2):
vhost-user: fix the reconnect error
vhost-user-scsi: free the inflight area when reset
hw/block/vhost-user-blk.c | 8 +++-
hw/scsi/vhost-user-scsi.c | 19 ++-
hw/virtio/vhost-user-gpio.c | 3 ++-
hw/virtio/virtio.c | 2 +-
4 files changed
If the error occurs in vhost_dev_init, the value of s->connected is set to true
in advance, and there is no chance to enter this function execution again
in the future.
Signed-off-by: Li Feng
---
hw/block/vhost-user-blk.c | 8 +++-
hw/scsi/vhost-user-scsi.c | 3 ++-
hw/virtio/vhost-u
Hello Guys,
Ping…
These patches have been waiting for a long time. Can they be merged?
Best Regards,
li
> On 9 Oct 2023, at 12:46 PM, Li Feng wrote:
>
> Changes for v8:
> - [PATCH 3/5] vhost-user-scsi: support reconnect to backend
> - Fix code style suggested by Mano
If the backend crashes and restarts, the device is broken.
This patch adds reconnect for vhost-user-scsi.
This patch also improves the error messages, and reports some silent errors.
Tested with spdk backend.
Signed-off-by: Li Feng
---
hw/scsi/vhost-scsi-common.c | 16 +-
hw/scsi
a07d ("hw/virtio: generalise CHR_EVENT_CLOSED handling")
Signed-off-by: Li Feng
Reviewed-by: Raphael Norwitz
---
hw/block/vhost-user-blk.c | 2 +-
hw/scsi/vhost-user-scsi.c | 3 ++-
hw/virtio/vhost-user-gpio.c| 2 +-
hw/virtio/vhost-user.c | 10 --
incl
.
This patch is a preparation for the following patches.
Signed-off-by: Li Feng
Reviewed-by: Raphael Norwitz
---
hw/scsi/vhost-scsi-common.c | 37 ++---
1 file changed, 18 insertions(+), 19 deletions(-)
diff --git a/hw/scsi/vhost-scsi-common.c b/hw/scsi/vhost-scsi
reviewers in another
mail;
- Implement the `vhost_user_scsi_handle_output`;
- Add the started_vu safe check;
- Fix error handler;
- Check the inflight before set/get inflight fd.
Li Feng (5):
vhost-user-common: send get_inflight_fd once
vhost: move and rename the conn retry times
vhost-user-scs
Let's keep the same behavior as vhost-user-blk.
Some old guests kick virtqueue before setting VIRTIO_CONFIG_S_DRIVER_OK.
Signed-off-by: Li Feng
Reviewed-by: Raphael Norwitz
---
hw/scsi/vhost-user-scsi.c | 48 +++
1 file changed, 44 insertions(+), 4
Multiple devices need this macro, move it to a common header.
Signed-off-by: Li Feng
Reviewed-by: Raphael Norwitz
---
hw/block/vhost-user-blk.c | 4 +---
hw/virtio/vhost-user-gpio.c | 3 +--
include/hw/virtio/vhost.h | 2 ++
3 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/hw
Thanks for your comments, I will submit the v8.
> On 8 Oct 2023, at 6:46 PM, Manos Pitsidianakis
> wrote:
>
> Hello Li, I have some trivial style comments you could possibly address in a
> next version:
>
> On Sun, 08 Oct 2023 12:12, Li Feng wrote:
>> diff --git
.
This patch is a preparation for the following patches.
Signed-off-by: Li Feng
Reviewed-by: Raphael Norwitz
---
hw/scsi/vhost-scsi-common.c | 37 ++---
1 file changed, 18 insertions(+), 19 deletions(-)
diff --git a/hw/scsi/vhost-scsi-common.c b/hw/scsi/vhost-scsi
her
mail;
- Implement the `vhost_user_scsi_handle_output`;
- Add the started_vu safe check;
- Fix error handler;
- Check the inflight before set/get inflight fd.
Li Feng (5):
vhost-user-common: send get_inflight_fd once
vhost: move and rename the conn retry times
vhost-user-scsi: support
Let's keep the same behavior as vhost-user-blk.
Some old guests kick virtqueue before setting VIRTIO_CONFIG_S_DRIVER_OK.
Signed-off-by: Li Feng
Reviewed-by: Raphael Norwitz
---
hw/scsi/vhost-user-scsi.c | 48 +++
1 file changed, 44 insertions(+), 4
a07d ("hw/virtio: generalise CHR_EVENT_CLOSED handling")
Signed-off-by: Li Feng
Reviewed-by: Raphael Norwitz
---
hw/block/vhost-user-blk.c | 2 +-
hw/scsi/vhost-user-scsi.c | 3 ++-
hw/virtio/vhost-user-gpio.c| 2 +-
hw/virtio/vhost-user.c | 10 --
incl
Multiple devices need this macro, move it to a common header.
Signed-off-by: Li Feng
Reviewed-by: Raphael Norwitz
---
hw/block/vhost-user-blk.c | 4 +---
hw/virtio/vhost-user-gpio.c | 3 +--
include/hw/virtio/vhost.h | 2 ++
3 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/hw
If the backend crashes and restarts, the device is broken.
This patch adds reconnect for vhost-user-scsi.
This patch also improves the error messages, and reports some silent errors.
Tested with spdk backend.
Signed-off-by: Li Feng
---
hw/scsi/vhost-scsi-common.c | 16 +-
hw/scsi
On Sun, Oct 8, 2023 at 4:51 PM Michael S. Tsirkin wrote:
>
> On Sun, Oct 08, 2023 at 04:49:05PM +0800, Li Feng wrote:
> > On Fri, Sep 29, 2023 at 8:55 AM Raphael Norwitz
> > wrote:
> > >
> > >
> > >
> > > > On Sep 22, 20
On Sun, Oct 8, 2023 at 4:49 PM Michael S. Tsirkin wrote:
>
> On Fri, Sep 22, 2023 at 07:46:10PM +0800, Li Feng wrote:
> > Changes for v6:
> > - [PATCH] vhost-user: fix lost reconnect
> > - Fix missing assign event_cb.
>
>
> Pls don't make vN+1 a reply to vN
On Fri, Sep 29, 2023 at 8:55 AM Raphael Norwitz
wrote:
>
>
>
> > On Sep 22, 2023, at 7:46 AM, Li Feng wrote:
> >
> > Currently the get_inflight_fd will be sent every time the device is
> > started, and
> > the backend will allocate shared memory to save
you? Otherwise do you think we should also
> fix up the vhost-user-blk realize function?
>
> > On Sep 22, 2023, at 7:46 AM, Li Feng wrote:
> >
> > If the backend crashes and restarts, the device is broken.
> > This patch adds reconnect for vhost-user-scsi.
> &
If the backend crashes and restarts, the device is broken.
This patch adds reconnect for vhost-user-scsi.
This patch also improves the error messages, and reports some silent errors.
Tested with spdk backend.
Signed-off-by: Li Feng
---
hw/scsi/vhost-scsi-common.c | 16 +-
hw/scsi
.
This patch is a preparation for the following patches.
Signed-off-by: Li Feng
---
hw/scsi/vhost-scsi-common.c | 37 ++---
1 file changed, 18 insertions(+), 19 deletions(-)
diff --git a/hw/scsi/vhost-scsi-common.c b/hw/scsi/vhost-scsi-common.c
index a06f01af26
a07d ("hw/virtio: generalise CHR_EVENT_CLOSED handling")
Signed-off-by: Li Feng
---
hw/block/vhost-user-blk.c | 2 +-
hw/scsi/vhost-user-scsi.c | 3 ++-
hw/virtio/vhost-user-gpio.c| 2 +-
hw/virtio/vhost-user.c | 10 --
include/hw/virtio/vhost-user.h | 3 +
patch to small separate patchset;
- New patch for fixing fd leak, which has sent to reviewers in another
mail;
- Implement the `vhost_user_scsi_handle_output`;
- Add the started_vu safe check;
- Fix error handler;
- Check the inflight before set/get inflight fd.
Li Feng (5):
vhost-user-common
Multiple devices need this macro, move it to a common header.
Signed-off-by: Li Feng
Reviewed-by: Raphael Norwitz
---
hw/block/vhost-user-blk.c | 4 +---
hw/virtio/vhost-user-gpio.c | 3 +--
include/hw/virtio/vhost.h | 2 ++
3 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/hw
Let's keep the same behavior as vhost-user-blk.
Some old guests kick virtqueue before setting VIRTIO_CONFIG_S_DRIVER_OK.
Signed-off-by: Li Feng
---
hw/scsi/vhost-user-scsi.c | 48 +++
1 file changed, 44 insertions(+), 4 deletions(-)
diff --git a/hw/scsi
Multiple devices need this macro, move it to a common header.
Signed-off-by: Li Feng
Reviewed-by: Raphael Norwitz
---
hw/block/vhost-user-blk.c | 4 +---
hw/virtio/vhost-user-gpio.c | 3 +--
include/hw/virtio/vhost.h | 2 ++
3 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/hw
;
- New patch for fixing fd leak, which has sent to reviewers in another
mail;
- Implement the `vhost_user_scsi_handle_output`;
- Add the started_vu safe check;
- Fix error handler;
- Check the inflight before set/get inflight fd.
Li Feng (5):
vhost-user-common: send get_inflight_fd once
vhost
a07d ("hw/virtio: generalise CHR_EVENT_CLOSED handling")
Signed-off-by: Li Feng
---
hw/block/vhost-user-blk.c | 2 +-
hw/scsi/vhost-user-scsi.c | 3 ++-
hw/virtio/vhost-user-gpio.c| 2 +-
hw/virtio/vhost-user.c | 9 +++--
include/hw/virtio/vhost-user.h | 3 ++-
Let's keep the same behavior as vhost-user-blk.
Some old guests kick virtqueue before setting VIRTIO_CONFIG_S_DRIVER_OK.
Signed-off-by: Li Feng
---
hw/scsi/vhost-user-scsi.c | 48 +++
1 file changed, 44 insertions(+), 4 deletions(-)
diff --git a/hw/scsi
.
This patch is a preparation for the following patches.
Signed-off-by: Li Feng
---
hw/scsi/vhost-scsi-common.c | 37 ++---
1 file changed, 18 insertions(+), 19 deletions(-)
diff --git a/hw/scsi/vhost-scsi-common.c b/hw/scsi/vhost-scsi-common.c
index a06f01af26
If the backend crashes and restarts, the device is broken.
This patch adds reconnect for vhost-user-scsi.
This patch also improves the error messages, and reports some silent errors.
Tested with spdk backend.
Signed-off-by: Li Feng
---
hw/scsi/vhost-scsi-common.c | 16 +-
hw/scsi
the v1 patch to small separate patchset;
- New patch for fixing fd leak, which has sent to reviewers in another
mail;
- Implement the `vhost_user_scsi_handle_output`;
- Add the started_vu safe check;
- Fix error handler;
- Check the inflight before set/get inflight fd.
Li Feng (5):
vhost-user
Let's keep the same behavior as vhost-user-blk.
Some old guests kick virtqueue before setting VIRTIO_CONFIG_S_DRIVER_OK.
Signed-off-by: Li Feng
---
hw/scsi/vhost-user-scsi.c | 51 +++
1 file changed, 46 insertions(+), 5 deletions(-)
diff --git a/hw/scsi
Multiple devices need this macro, move it to a common header.
Signed-off-by: Li Feng
Reviewed-by: Raphael Norwitz
---
hw/block/vhost-user-blk.c | 4 +---
hw/virtio/vhost-user-gpio.c | 3 +--
include/hw/virtio/vhost.h | 2 ++
3 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/hw
a07d ("hw/virtio: generalise CHR_EVENT_CLOSED handling")
Signed-off-by: Li Feng
---
hw/block/vhost-user-blk.c | 2 +-
hw/virtio/vhost-user-gpio.c| 2 +-
hw/virtio/vhost-user.c | 9 +++--
include/hw/virtio/vhost-user.h | 3 ++-
4 files changed, 11 insertions(+), 5 delet
.
This patch is a preparation for the following patches.
Signed-off-by: Li Feng
---
hw/scsi/vhost-scsi-common.c | 37 ++---
1 file changed, 18 insertions(+), 19 deletions(-)
diff --git a/hw/scsi/vhost-scsi-common.c b/hw/scsi/vhost-scsi-common.c
index a06f01af26
If the backend crashes and restarts, the device is broken.
This patch adds reconnect for vhost-user-scsi.
This patch also improves the error messages, and reports some silent errors.
Tested with spdk backend.
Signed-off-by: Li Feng
---
hw/scsi/vhost-scsi-common.c | 16 +-
hw/scsi
> On 1 Sep 2023, at 8:00 PM, Markus Armbruster wrote:
>
> Li Feng mailto:fen...@smartx.com>> writes:
>
>> Add a Error parameter to report the real error, like vhost-user-blk.
>>
>> Signed-off-by: Li Feng
>> ---
>> hw/scsi/vhost-scsi-common.c
> On 1 Sep 2023, at 8:00 PM, Markus Armbruster wrote:
>
> Li Feng mailto:fen...@smartx.com>> writes:
>
>> If the backend crashes and restarts, the device is broken.
>> This patch adds reconnect for vhost-user-scsi.
>>
>> Tested with spdk backend.
&
> On 1 Sep 2023, at 7:44 PM, Markus Armbruster wrote:
>
> Li Feng mailto:fen...@smartx.com>> writes:
>
>> Let's keep the same behavior as vhost-user-blk.
>>
>> Some old guests kick virtqueue before setting VIRTIO_CONFIG_S_DRIVER_OK.
>>
>> Sign
a07d ("hw/virtio: generalise CHR_EVENT_CLOSED handling")
Signed-off-by: Li Feng
---
hw/block/vhost-user-blk.c | 2 +-
hw/scsi/vhost-user-scsi.c | 3 ++-
hw/virtio/vhost-user-gpio.c| 2 +-
hw/virtio/vhost-user.c | 9 +++--
include/hw/virtio/vhost-user.h | 3 ++-
Add a Error parameter to report the real error, like vhost-user-blk.
Signed-off-by: Li Feng
---
hw/scsi/vhost-scsi-common.c | 16 +---
hw/scsi/vhost-scsi.c | 5 +++--
hw/scsi/vhost-user-scsi.c | 14 --
include/hw/virtio/vhost-scsi
/
Changes for v3:
- Fix the code style.
Changes for v2:
- Add a event_cb in VhostAsyncCallback to be called when dev is NULL;
- Fix the error report message.
Li Feng (2):
vhost-user: Fix lost reconnect
vhost: Add Error parameter to vhost_scsi_common_start()
hw/block/vhost-user-blk.c
> On 30 Aug 2023, at 6:11 AM, Raphael Norwitz
> wrote:
>
>
>
>> On Aug 24, 2023, at 3:41 AM, Li Feng wrote:
>>
>> When the vhost-user is reconnecting to the backend, and if the vhost-user
>> fails
>> at the get_features in v
a07d ("hw/virtio: generalise CHR_EVENT_CLOSED handling")
Signed-off-by: Li Feng
---
hw/block/vhost-user-blk.c | 2 +-
hw/scsi/vhost-user-scsi.c | 3 ++-
hw/virtio/vhost-user-gpio.c| 2 +-
hw/virtio/vhost-user.c | 10 --
include/hw/virtio/vhost-user.h | 4 ++
/
Changes for v2:
- Add a event_cb in VhostAsyncCallback to be called when dev is NULL;
- Fix the error report message.
Li Feng (2):
vhost-user: Fix lost reconnect
vhost: Add Error parameter to vhost_scsi_common_start()
hw/block/vhost-user-blk.c | 2 +-
hw/scsi/vhost-scsi
Add a Error parameter to report the real error, like vhost-user-blk.
Signed-off-by: Li Feng
---
hw/scsi/vhost-scsi-common.c | 16 +---
hw/scsi/vhost-scsi.c | 5 +++--
hw/scsi/vhost-user-scsi.c | 14 --
include/hw/virtio/vhost-scsi
> On 22 Aug 2023, at 6:17 PM, Raphael Norwitz
> wrote:
>
>
>
>> On Aug 22, 2023, at 12:49 AM, Li Feng wrote:
>>
>>
>>
>>> On 22 Aug 2023, at 8:38 AM, Raphael Norwitz
>>> wrote:
>>>
>>>>
>>>>
On 22 Aug 2023, at 8:38 AM, Raphael Norwitz
wrote:
On Aug 17, 2023, at 2:40 AM, Li Feng wrote:
2023年8月14日 下午8:11,Raphael Norwitz 写道:
Why can’t we rather fix this by adding a “event_cb” param to
vhost_user_async_close and then call qemu_chr_fe_set_handlers in
vhost_user_async_close_bh
On 21 Aug 2023, at 8:09 PM, Markus Armbruster wrote:
Li Feng writes:
2023年8月14日 下午8:11,Raphael Norwitz 写道:
Thanks for the cleanup! A few comments.
On Aug 4, 2023, at 1:29 AM, Li Feng wrote:
Add a Error parameter to report the real error, like vhost-user-blk.
Signed-off-by: Li Feng
> 2023年8月14日 下午8:11,Raphael Norwitz 写道:
>
> Thanks for the cleanup! A few comments.
>
>> On Aug 4, 2023, at 1:29 AM, Li Feng wrote:
>>
>> Add a Error parameter to report the real error, like vhost-user-blk.
>>
>> Signed-off-by: Li Feng
>> -
{
/* @started: is the vhost device started? */
bool started;
bool log_enabled;
+bool inited;
uint64_t log_size;
Error *migration_blocker;
const VhostOps *vhost_ops;
Thanks.
>
>> On Aug 4, 2023, at 1:29 AM, Li Feng wrote:
>>
>> When the vhost
/
Li Feng (2):
vhost-user: fix lost reconnect
vhost: Add Error parameter to vhost_scsi_common_start()
hw/scsi/vhost-scsi-common.c | 17 ++---
hw/scsi/vhost-scsi.c | 5 +++--
hw/scsi/vhost-user-scsi.c | 14 --
hw/virtio/vhost
Add a Error parameter to report the real error, like vhost-user-blk.
Signed-off-by: Li Feng
---
hw/scsi/vhost-scsi-common.c | 17 ++---
hw/scsi/vhost-scsi.c | 5 +++--
hw/scsi/vhost-user-scsi.c | 14 --
include/hw/virtio/vhost-scsi
Fixes: 71e076a07d ("hw/virtio: generalise CHR_EVENT_CLOSED handling")
Signed-off-by: Li Feng
---
hw/virtio/vhost-user.c | 10 +-
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c
index 8dcf049d42..697b403fe2 100644
--- a/hw/vir
.
This patch is a preparation for the following patches.
Signed-off-by: Li Feng
---
hw/scsi/vhost-scsi-common.c | 37 ++---
1 file changed, 18 insertions(+), 19 deletions(-)
diff --git a/hw/scsi/vhost-scsi-common.c b/hw/scsi/vhost-scsi-common.c
index a06f01af26
Multiple devices need this macro, move it to a common header.
Signed-off-by: Li Feng
Reviewed-by: Raphael Norwitz
---
hw/block/vhost-user-blk.c | 4 +---
hw/virtio/vhost-user-gpio.c | 3 +--
include/hw/virtio/vhost.h | 2 ++
3 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/hw
If the backend crashes and restarts, the device is broken.
This patch adds reconnect for vhost-user-scsi.
Tested with spdk backend.
Signed-off-by: Li Feng
---
hw/scsi/vhost-user-scsi.c | 199 +---
include/hw/virtio/vhost-user-scsi.h | 4 +
2 files changed
Let's keep the same behavior as vhost-user-blk.
Some old guests kick virtqueue before setting VIRTIO_CONFIG_S_DRIVER_OK.
Signed-off-by: Li Feng
---
hw/scsi/vhost-user-scsi.c | 48 +++
1 file changed, 44 insertions(+), 4 deletions(-)
diff --git a/hw/scsi
.
Li Feng (5):
vhost: fix the fd leak
vhost-user-common: send get_inflight_fd once
vhost: move and rename the conn retry times
vhost-user-scsi: support reconnect to backend
vhost-user-scsi: start vhost when guest kicks
hw/block/vhost-user-blk.c | 4 +-
hw/scsi/vhost-scsi
When the vhost-user reconnect to the backend, the notifer should be
cleanup. Otherwise, the fd resource will be exhausted.
Fixes: f9a09ca3ea ("vhost: add support for configure interrupt")
Signed-off-by: Li Feng
Reviewed-by: Raphael Norwitz
---
hw/virtio/vhost.c | 2 ++
1 file
> 2023年7月31日 06:13,Raphael Norwitz 写道:
>
>>
>> On Jul 28, 2023, at 3:49 AM, Li Feng wrote:
>>
>>
>>
>>> 2023年7月28日 下午2:04,Michael S. Tsirkin 写道:
>>>
>>> On Tue, Jul 25, 2023 at 06:42:45PM +0800, Li Feng wrote:
>>&
> 2023年7月31日 06:09,Raphael Norwitz 写道:
>
>
>
>> On Jul 28, 2023, at 3:48 AM, Li Feng wrote:
>>
>> Thanks for your reply.
>>
>>> 2023年7月28日 上午5:21,Raphael Norwitz 写道:
>>>
>>>
>>>
>>>> On Jul 25, 2023,
think this is looking good.
>
> Glad to see you caught the vhost_user_scsi_handle_ouptut and implemented it
> like vhost-user-blk. Can it go in a separate change?
I will fix it in v3.
>
>> On Jul 25, 2023, at 6:42 AM, Li Feng wrote:
>>
>> If the backend crashe
Thanks for your reply.
> 2023年7月28日 上午5:21,Raphael Norwitz 写道:
>
>
>
>> On Jul 25, 2023, at 6:19 AM, Li Feng wrote:
>>
>> Thanks for your comments.
>>
>>> 2023年7月25日 上午1:21,Raphael Norwitz 写道:
>>>
>>> Very excited to see thi
> 2023年7月28日 下午2:04,Michael S. Tsirkin 写道:
>
> On Tue, Jul 25, 2023 at 06:42:45PM +0800, Li Feng wrote:
>> Get_inflight_fd is sent only once. When reconnecting to the backend,
>> qemu sent set_inflight_fd to the backend.
>
> I don't understand what you are t
> 2023年7月25日 下午6:42,Li Feng 写道:
>
> If the backend crashes and restarts, the device is broken.
> This patch adds reconnect for vhost-user-scsi.
>
> Tested with spdk backend.
>
> Signed-off-by: Li Feng
> ---
> hw/scsi/vhost-scsi-common.c | 6
If the backend crashes and restarts, the device is broken.
This patch adds reconnect for vhost-user-scsi.
Tested with spdk backend.
Signed-off-by: Li Feng
---
hw/scsi/vhost-scsi-common.c | 6 +
hw/scsi/vhost-user-scsi.c | 220 +++---
include/hw
the `vhost_user_scsi_handle_output`;
- Add the started_vu safe check;
- Fix error handler;
- Check the inflight before set/get inflight fd.
Li Feng (4):
vhost: fix the fd leak
vhost-user-common: send get_inflight_fd once
vhost: move and rename the conn retry times
vhost-user-scsi: support reconnect
When the vhost-user reconnect to the backend, the notifer should be
cleanup. Otherwise, the fd resource will be exhausted.
Fixes: f9a09ca3ea ("vhost: add support for configure interrupt")
Signed-off-by: Li Feng
---
hw/virtio/vhost.c | 2 ++
1 file changed, 2 insertions(+)
diff
Get_inflight_fd is sent only once. When reconnecting to the backend,
qemu sent set_inflight_fd to the backend.
Signed-off-by: Li Feng
---
hw/scsi/vhost-scsi-common.c | 37 ++---
1 file changed, 18 insertions(+), 19 deletions(-)
diff --git a/hw/scsi/vhost-scsi
Multile devices need this macro, move it to a common header.
Signed-off-by: Li Feng
---
hw/block/vhost-user-blk.c | 4 +---
hw/virtio/vhost-user-gpio.c | 3 +--
include/hw/virtio/vhost.h | 2 ++
3 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/hw/block/vhost-user-blk.c b/hw
der, it’s not safe to
> continue execution on reconnect, as there’s no way for the backend to know
> how to replay IO. Should we permanently wedge the device or have QEMU fail
> out? May be nice to have a toggle for this.
Based on what MST said, is there anything else I need to do?
>
&
When the vhost-user reconnect to the backend, the notifer should be
cleanup. Otherwise, the fd resource will be exhausted.
Fixes: f9a09ca3ea ("vhost: add support for configure interrupt")
Signed-off-by: Li Feng
---
hw/virtio/vhost.c | 2 ++
1 file changed, 2 insertions(+)
diff
If the backend crashes and restarts, the device is broken.
This patch adds reconnect for vhost-user-scsi.
Tested with spdk backend.
Signed-off-by: Li Feng
---
hw/block/vhost-user-blk.c | 2 -
hw/scsi/vhost-scsi-common.c | 27 ++---
hw/scsi/vhost-user-scsi.c | 163
If the os is not installed and doesn't have the virtio guest driver,
the vhost dev isn't started, so the dev->vdev is NULL.
Reproduce: mount a Win 2019 iso, go into the install ui, then resize
the virtio-blk device, qemu crash.
Signed-off-by: Li Feng
---
hw/block/vhost-user-blk.c | 4
Sorry, looks like I use the old qemu code, master has fix this issue.
Just ignore this patch.
> 2022年8月23日 下午1:38,Li Feng 写道:
>
> If the vhost memory layout doesn't change, don't need to call the vhost
> backend.
> The set_mem_table is time consuming when sending to vho
If the vhost memory layout doesn't change, don't need to call the vhost
backend.
The set_mem_table is time consuming when sending to vhost-user backend.
On aarch64, the edk2 uefi firmware will write the pflash which will
trigger the vhost_commit hundreds of times.
Signed-off-by: Li Feng
---
hw
ly, the file.locking is per-drive property,
which depends on the underlay filesystem.
In this patch, add a new 'qemu_has_file_lock' to detect whether the
file supports the file lock. And disable the lock when the underlay file
system doesn't support locks.
Signed-off-by: Li Feng
---
v5: simpli
Daniel P. Berrangé 于2020年12月15日周二 下午6:08写道:
>
> On Tue, Dec 15, 2020 at 03:09:28PM +0800, Li Feng wrote:
> > This patch addresses this issue:
> > When accessing a volume on an NFS filesystem without supporting the file
> > lock,
> > tools, like qemu-img, will com
ly, the file.locking is per-drive property,
which depends on the underlay filesystem.
In this patch, add a new 'qemu_has_file_lock' to detect whether the
file supports the file lock. And disable the lock when the underlay file
system doesn't support locks.
Signed-off-by: Li Feng
ve is auto mode, use the 'qemu_has_file_lock' to set the toggle.
Signed-off-by: Li Feng
---
v3: don't call the qemu_has_ofd_lock, use a new function instead.
v2: remove the refactoring.
---
block/file-posix.c | 30 +-
include/qemu/osdep.h | 1 +
util/osdep.c
ly, the file.locking is per-drive property,
which depends on the underlay filesystem.
In this patch, make the 'qemu_has_ofd_lock' with a filename be more
generic and reasonable.
Signed-off-by: Li Feng
---
v2: remove the refactoring.
---
block/file-posix.c | 32 ++
1 - 100 of 155 matches
Mail list logo