[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4 0/2] vhost-user reconnect issues during vhost initializati
From: |
Stefan Hajnoczi |
Subject: |
Re: [PATCH v4 0/2] vhost-user reconnect issues during vhost initialization |
Date: |
Mon, 14 Sep 2020 14:40:28 +0100 |
On Thu, May 28, 2020 at 12:11:17PM +0300, Dima Stepanov wrote:
> Before revising the vhost-user initialization code, we suggest adding
> the sanity checks to be aware of the possible disconnect event and that
> the vhost_dev structure can be in "uninitialized" state.
>
> The vhost-user-blk daemon is updated with the additional
> "--simulate-disconnect-stage=CASENUM" argument to simulate disconnect during
> VHOST device initialization. For instance:
> 1. $ ./vhost-user-blk -s ./vhost.sock -b test-img.raw
> --simulate-disconnect-stage=1
> This command will simulate disconnect in the SET_VRING_CALL handler.
> In this case the vhost device in QEMU is not set the started field to
> true.
> 2. $ ./vhost-user-blk -s ./vhost.sock -b test-img.raw
> --simulate-disconnect-stage=2
> This command will simulate disconnect in the SET_VRING_NUM handler.
> In this case the started field is set to true.
> These two cases test different QEMU parts. Also to trigger different code
> paths
> disconnect should be simulated in two ways:
> - before any successful initialization
> - make successful initialization once and try to simulate disconnects
> Also we catch SIGABRT on the migration start if vhost-user daemon disconnected
> during vhost-user set log commands communication.
>
> Dima Stepanov (2):
> char-socket: return -1 in case of disconnect during tcp_chr_write
> vhost-user-blk: delay vhost_user_blk_disconnect
>
> chardev/char-socket.c | 7 ++++---
> hw/block/vhost-user-blk.c | 38 +++++++++++++++++++++++++++++++++++++-
> 2 files changed, 41 insertions(+), 4 deletions(-)
Hi Dima,
The cover letter mentions ./vhost-user-blk --simulate-disconnect-stage=N
to simulate unexpected disconnects but I don't see that option in
contrib/vhost-user-blk/.
Is there a test case?
Thanks,
Stefan
signature.asc
Description: PGP signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [PATCH v4 0/2] vhost-user reconnect issues during vhost initialization,
Stefan Hajnoczi <=