+1
−1
+2
−0
Loading
Previously, the LUN reset completion logic did not correctly handle the case where the underlying bdev reset operation itself failed. The task response was not being set correctly, which could lead to the `scsi_lun_complete_reset` function improperly proceeding to check for outstanding tasks even after a failed reset. This patch corrects the behavior by: 1. Setting the task response to `SPDK_SCSI_TASK_MGMT_RESP_COMPLETE` when the bdev reset operation is unsuccessful. 2. Ensuring that the poller to check for outstanding tasks is only registered if the reset operation was successful (`SUCCESS`). This prevents incorrect logic execution paths and ensures that management tasks are completed with the proper status. Change-Id: Ie64b65d0988df60919fde3a71b2fbf460212cbaa Signed-off-by:Kou Jiawei <kou.jiawei@zte.com.cn> Reviewed-on: https://review.spdk.io/c/spdk/spdk/+/26436 Tested-by:
SPDK Automated Test System <spdkbot@gmail.com> Reviewed-by:
Shuhei Matsumoto <smatsumoto@nvidia.com> Reviewed-by:
Jim Harris <jim.harris@nvidia.com> Reviewed-by:
Changpeng Liu <changpeliu@tencent.com> Community-CI: Mellanox Build Bot