All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Stefan Hajnoczi <stefanha@redhat.com>
Cc: qemu-devel@nongnu.org,
	"Pierrick Bouvier" <pierrick.bouvier@oss.qualcomm.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	akalenyu@redhat.com, "Kevin Wolf" <kwolf@redhat.com>,
	"Daniel P. Berrangé" <berrange@redhat.com>,
	"Fam Zheng" <fam@euphon.net>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	qemu-block@nongnu.org, "Hanna Reitz" <hreitz@redhat.com>,
	"Benjamin Marzinski" <bmarzins@redhat.com>
Subject: Re: [PATCH v2 7/8] scsi: clean up persistent reservation state after migration
Date: Tue, 13 Oct 2026 15:04:14 -0500	[thread overview]
Message-ID: <as6Msz5F7DFMVf2p@redhat.com> (raw)
In-Reply-To: <20261013181752.1299456-8-stefanha@redhat.com>

On Tue, Oct 13, 2026 at 02:17:51PM -0400, Stefan Hajnoczi wrote:
> Live migration of persistent reservations is designed to work without
> coordination between the source and destination. The destination uses
> the PREEMPT command to atomically take over the reservation or
> unregister keys belonging to the source. This approach avoids race
> conditions where other nodes in the cluster might acquire the
> reservation and it minimizes communication during the downtime window.
> 
> While this works at the SCSI level, this approach is incomplete when
> using multipathd. Multipathd tracks registered keys and automatically
> registers them again when paths come up. It is unaware that the
> destination has preempted the reservation and therefore it will still
> attempt to register the key on the source host.
> 
> Use the new PR_HELPER_CLEANUP command to communicate with multipathd on
> the source after migration completes successfully. The effect is similar
> to REGISTER AND IGNORE EXISTING KEY, except it also discards
> multipathd's state so that the source will no longer attempt to register
> the key.
> 
> PR_HELPER_CLEANUP is a QEMU-internal command that is rejected by
> scsi_req_new(), so note that this command is not exposed to guests
> although direct blk_aio_ioctl(SG_IO) calls can make use of it.
> 
> Buglink: https://redhat.atlassian.net/browse/RHEL-274966
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
>  include/hw/scsi/scsi.h |  1 +
>  hw/scsi/scsi-disk.c    | 21 ++++++++++++++++++++-
>  hw/scsi/scsi-generic.c | 29 +++++++++++++++++++++++++++++
>  3 files changed, 50 insertions(+), 1 deletion(-)
> 

Reviewed-by: Eric Blake <eblake@redhat.com>

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.
Virtualization:  qemu.org | libguestfs.org



  reply	other threads:[~2026-10-13 20:04 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-13 18:17 [PATCH v2 0/8] scsi: clean up persistent reservation state after migration Stefan Hajnoczi
2026-10-13 18:17 ` [PATCH v2 1/8] pr-manager-helper: fix sense buffer overflow Stefan Hajnoczi
2026-10-13 18:17 ` [PATCH v2 2/8] scsi: increase sense buffer size in scsi_SG_IO() Stefan Hajnoczi
2026-10-13 18:17 ` [PATCH v2 3/8] hw/scsi-disk: move MIG_EVENT_FAILED into a new function Stefan Hajnoczi
2026-10-13 19:16   ` Eric Blake
2026-10-13 18:17 ` [PATCH v2 4/8] qemu-pr-helper: add PR_HELPER_CLEANUP for live migration Stefan Hajnoczi
2026-10-13 19:47   ` Eric Blake
2026-10-13 19:47   ` Paolo Bonzini
2026-10-13 18:17 ` [PATCH v2 5/8] pr-manager-helper: add PR_HELPER_CLEANUP command support Stefan Hajnoczi
2026-10-13 19:49   ` Eric Blake
2026-10-13 18:17 ` [PATCH v2 6/8] file-posix: forward PR_HELPER_CLEANUP commands to pr-manager Stefan Hajnoczi
2026-10-13 19:51   ` Eric Blake
2026-10-13 18:17 ` [PATCH v2 7/8] scsi: clean up persistent reservation state after migration Stefan Hajnoczi
2026-10-13 20:04   ` Eric Blake [this message]
2026-10-13 18:17 ` [PATCH v2 8/8] scsi: use REGISTER AND IGNORE EXISTING KEY for robustness Stefan Hajnoczi
2026-10-13 20:05   ` Eric Blake

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=as6Msz5F7DFMVf2p@redhat.com \
    --to=eblake@redhat.com \
    --cc=akalenyu@redhat.com \
    --cc=berrange@redhat.com \
    --cc=bmarzins@redhat.com \
    --cc=fam@euphon.net \
    --cc=hreitz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=pierrick.bouvier@oss.qualcomm.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.