+3
−0
Loading
When SPDK acts as a SCSI target, a host may perform the following operations on a specific IT nexus, leading to an issue: 1. Register & Ignore Existing Key, SAK=0x0a -> OK 2. Reserve, RK=0x0a -> OK 3. Register & Ignore Existing Key, SAK=0x0b, RK=0x0a -> OK 4. Read Reservation -> returns old RK=0x0a, but expected RK=0x0b. The root cause is that when a "Register" or "Register & Ignore Existing Key" operation changes the reservation key (RKey) of an already registered nexus, SPDK fails to update the reservation holder's key if that nexus is also the reservation holder. This patch fixes the issue by ensuring the holder's reservation key is also updated in this scenario. Change-Id: I8c85ab74b88e972beb528e54ce564cc6ed53775d Signed-off-by:Kou Jiawei <kou.jiawei@zte.com.cn> Reviewed-on: https://review.spdk.io/c/spdk/spdk/+/26264 Tested-by:
SPDK Automated Test System <spdkbot@gmail.com> Reviewed-by:
Jim Harris <jim.harris@nvidia.com> Community-CI: Mellanox Build Bot Reviewed-by:
Changpeng Liu <changpeliu@tencent.com>