[PATCH 0/2] scsi: handle reservation changes across migration

Stefan Hajnoczi posted 2 patches 1 month, 2 weeks ago
Failed in applying to current master (apply log)
include/hw/scsi/scsi.h |   3 +-
hw/scsi/scsi-generic.c | 175 +++++++++++++++++++++++++++++++++++------
2 files changed, 152 insertions(+), 26 deletions(-)
[PATCH 0/2] scsi: handle reservation changes across migration
Posted by Stefan Hajnoczi 1 month, 2 weeks ago
The SCSI Persistent Reservation code can fail if another node has interfered
with the reservation (e.g. by sending a PERSISTENT RESERVE OUT command with a
PREEMPT or CLEAR service action). This is rare but can happen if the
application or clustering framework performs recovery and wants to take away
the guest's reservation.

This patch series adds an extra step when loading device state that
synchronizes the transferred vmstate against the actual reservation state of
the disk before moving the reservation. This way we can gracefully handle
changes to reservations that were performed externally.

Stefan Hajnoczi (2):
  scsi: change buf_size to unsigned int in scsi_SG_IO()
  scsi: handle reservation changes across migration

 include/hw/scsi/scsi.h |   3 +-
 hw/scsi/scsi-generic.c | 175 +++++++++++++++++++++++++++++++++++------
 2 files changed, 152 insertions(+), 26 deletions(-)

-- 
2.53.0
Re: [PATCH 0/2] scsi: handle reservation changes across migration
Posted by Stefan Hajnoczi 1 month ago
On Wed, Apr 15, 2026 at 07:29:04PM -0400, Stefan Hajnoczi wrote:
> The SCSI Persistent Reservation code can fail if another node has interfered
> with the reservation (e.g. by sending a PERSISTENT RESERVE OUT command with a
> PREEMPT or CLEAR service action). This is rare but can happen if the
> application or clustering framework performs recovery and wants to take away
> the guest's reservation.
> 
> This patch series adds an extra step when loading device state that
> synchronizes the transferred vmstate against the actual reservation state of
> the disk before moving the reservation. This way we can gracefully handle
> changes to reservations that were performed externally.
> 
> Stefan Hajnoczi (2):
>   scsi: change buf_size to unsigned int in scsi_SG_IO()
>   scsi: handle reservation changes across migration
> 
>  include/hw/scsi/scsi.h |   3 +-
>  hw/scsi/scsi-generic.c | 175 +++++++++++++++++++++++++++++++++++------
>  2 files changed, 152 insertions(+), 26 deletions(-)

Ping.

Stefan