public inbox for virtio-fs@lists.linux.dev
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Haoqian He <haoqian.he@smartx.com>
Cc: qemu-devel@nongnu.org, sgarzare@redhat.com,
	raphael@enfabrica.net, fengli@smartx.com, yuhua@smartx.com,
	"Kevin Wolf" <kwolf@redhat.com>,
	"Hanna Reitz" <hreitz@redhat.com>,
	"Stefan Hajnoczi" <stefanha@redhat.com>,
	"Laurent Vivier" <lvivier@redhat.com>,
	"Amit Shah" <amit@kernel.org>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Gerd Hoffmann" <kraxel@redhat.com>,
	"Jason Wang" <jasowang@redhat.com>, "Fam Zheng" <fam@euphon.net>,
	"Alex Williamson" <alex.williamson@redhat.com>,
	"Cédric Le Goater" <clg@redhat.com>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"reviewer:vhost-user-scmi" <mzamazal@redhat.com>,
	"David Hildenbrand" <david@redhat.com>,
	"Gonglei (Arei)" <arei.gonglei@huawei.com>,
	"Eric Auger" <eric.auger@redhat.com>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"open list:Block layer core" <qemu-block@nongnu.org>,
	"open list:virtiofs" <virtio-fs@lists.linux.dev>
Subject: Re: [PATCH v5 0/3] vhost: fix the IO error after live migration
Date: Sun, 11 May 2025 14:00:33 -0400	[thread overview]
Message-ID: <20250511135931-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20250416024729.3289157-1-haoqian.he@smartx.com>

On Tue, Apr 15, 2025 at 10:47:25PM -0400, Haoqian He wrote:
> At the end of the VM live migration, the vhost device will be stopped.
> Currently, if the vhost-user backend crashes, vhost device's set_status()
> would not return failure, live migration won't perceive the disconnection
> with the backend. After the live migration is successful, the stale inflight
> IO will be submitted to the migration target host, which may be leading to
> the IO error.
> 
> The following patch series fixes the issue by making the live migration
> aware of the loss of connection with the vhost-user backend and aborting
> the live migration.

tagged, thanks a lot!


yet something to improve:

in the future pls post a new thread, not part of old thread.

also in the future, pls do not quote a huge mail just to add two lines
at the end, snip.



> ---
>   v1 ... v2
>     1. Fix some grammar issues in commit message.
>     2. Remove assert in vhost_scsi_common_stop and return error upwards.
> 
>   v2 ... v3
>     1. Added more detailed comments and commit message.
>     2. Change the newly added type name and parameter name.
>     3. Remove set_status_ext, change the return type of set_status to int.
> 
>   v3 ... v4
>     1. Call set_status() only if the function pointer is not NULL in the
>        3rd patch.
>     2. Add the more detailed commit messages for the 3rd patch.
> 
>   v4 ... v5
>     1. Fix code style issues in patch v4.
>     2. Rebased on master.
> 
> Haoqian He (3):
>   system/runstate: add VM state change cb with return value
>   vhost: return failure if stop virtqueue failed in vhost_dev_stop
>   vhost-user: return failure if backend crash when live migration
> 
>  backends/vhost-user.c                  | 20 +++++++--------
>  hw/block/vhost-user-blk.c              | 27 +++++++++++---------
>  hw/block/virtio-blk.c                  |  7 +++---
>  hw/char/virtio-serial-bus.c            |  3 ++-
>  hw/core/vm-change-state-handler.c      | 18 ++++++++-----
>  hw/display/vhost-user-gpu.c            | 12 ++++++---
>  hw/input/virtio-input.c                |  3 ++-
>  hw/net/virtio-net.c                    |  3 ++-
>  hw/scsi/scsi-bus.c                     |  2 +-
>  hw/scsi/vhost-scsi-common.c            | 13 +++++-----
>  hw/scsi/vhost-scsi.c                   |  5 ++--
>  hw/scsi/vhost-user-scsi.c              | 18 +++++++------
>  hw/vfio/migration.c                    |  2 +-
>  hw/virtio/vdpa-dev.c                   |  5 ++--
>  hw/virtio/vhost-user-base.c            | 23 ++++++++++-------
>  hw/virtio/vhost-user-fs.c              | 23 ++++++++++-------
>  hw/virtio/vhost-user-scmi.c            | 27 ++++++++++++--------
>  hw/virtio/vhost-user-vsock.c           | 15 +++++++----
>  hw/virtio/vhost-vsock-common.c         | 12 ++++-----
>  hw/virtio/vhost-vsock.c                | 11 ++++----
>  hw/virtio/vhost.c                      | 23 +++++++++--------
>  hw/virtio/virtio-balloon.c             |  3 ++-
>  hw/virtio/virtio-crypto.c              |  3 ++-
>  hw/virtio/virtio-iommu.c               |  3 ++-
>  hw/virtio/virtio-rng.c                 |  5 ++--
>  hw/virtio/virtio.c                     | 22 ++++++++++------
>  include/hw/virtio/vhost-scsi-common.h  |  2 +-
>  include/hw/virtio/vhost-vsock-common.h |  2 +-
>  include/hw/virtio/vhost.h              |  8 +++---
>  include/hw/virtio/virtio.h             |  2 +-
>  include/system/runstate.h              | 13 +++++++---
>  include/system/vhost-user-backend.h    |  2 +-
>  system/cpus.c                          |  8 ++++--
>  system/runstate.c                      | 35 ++++++++++++++++++++++----
>  34 files changed, 239 insertions(+), 141 deletions(-)
> 
> -- 
> 2.44.0


      parent reply	other threads:[~2025-05-11 18:00 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20250314101535.1059308-1-haoqian.he@smartx.com>
2025-03-27  6:43 ` [PATCH v3 0/3] vhost: fix the IO error after live migration Haoqian He
2025-03-27  6:43   ` [PATCH v3 1/3] system/runstate: add VM state change cb with return value Haoqian He
2025-03-27  6:43   ` [PATCH v3 2/3] vhost: return failure if stop virtqueue failed in vhost_dev_stop Haoqian He
2025-03-27  6:43   ` [PATCH v3 3/3] vhost-user: return failure if backend crash when live migration Haoqian He
2025-04-01 15:18   ` [PATCH v4 0/3] vhost: fix the IO error after " Haoqian He
2025-04-01 15:18     ` [PATCH v4 1/3] system/runstate: add VM state change cb with return value Haoqian He
2025-04-01 15:18     ` [PATCH v4 2/3] vhost: return failure if stop virtqueue failed in vhost_dev_stop Haoqian He
2025-04-01 15:18     ` [PATCH v4 3/3] vhost-user: return failure if backend crash when live migration Haoqian He
2025-04-03 21:15       ` Michael S. Tsirkin
2025-04-07 12:25         ` Haoqian He
2025-04-16  2:47     ` [PATCH v5 0/3] vhost: fix the IO error after " Haoqian He
2025-04-16  2:47       ` [PATCH v5 1/3] system/runstate: add VM state change cb with return value Haoqian He
2025-04-16  2:47       ` [PATCH v5 2/3] vhost: return failure if stop virtqueue failed in vhost_dev_stop Haoqian He
2025-04-16  2:47       ` [PATCH v5 3/3] vhost-user: return failure if backend crash when live migration Haoqian He
2025-04-23  6:45         ` Haoqian He
2025-04-23 10:03           ` Michael S. Tsirkin
2025-04-23 10:04             ` Michael S. Tsirkin
2025-04-17  1:48       ` [PATCH v5 0/3] vhost: fix the IO error after " Lei Yang
2025-05-11 18:00       ` Michael S. Tsirkin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250511135931-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=alex.williamson@redhat.com \
    --cc=amit@kernel.org \
    --cc=arei.gonglei@huawei.com \
    --cc=clg@redhat.com \
    --cc=david@redhat.com \
    --cc=eric.auger@redhat.com \
    --cc=fam@euphon.net \
    --cc=fengli@smartx.com \
    --cc=haoqian.he@smartx.com \
    --cc=hreitz@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=mzamazal@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=raphael@enfabrica.net \
    --cc=richard.henderson@linaro.org \
    --cc=sgarzare@redhat.com \
    --cc=stefanha@redhat.com \
    --cc=virtio-fs@lists.linux.dev \
    --cc=yuhua@smartx.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox