From fecac0d871b009e791a59e3fdf9e084d4bc5127a Mon Sep 17 00:00:00 2001 From: Changpeng Liu Date: Wed, 29 May 2019 19:53:52 -0400 Subject: [PATCH] scsi: fix SCSI reservation typos Change-Id: Ibbc5c95fddc3d39b7d9222fa203bc29e1cf44cf6 Signed-off-by: Changpeng Liu Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456285 Tested-by: SPDK CI Jenkins Reviewed-by: Jim Harris Reviewed-by: Shuhei Matsumoto --- include/spdk/scsi_spec.h | 2 +- lib/scsi/scsi_pr.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/spdk/scsi_spec.h b/include/spdk/scsi_spec.h index 2bca212a2..2711c8ea4 100644 --- a/include/spdk/scsi_spec.h +++ b/include/spdk/scsi_spec.h @@ -548,7 +548,7 @@ enum spdk_scsi_pr_type_code { struct spdk_scsi_pr_in_read_header { /* persistent reservation generation */ uint32_t pr_generation; - uint32_t addiontal_len; + uint32_t additional_len; }; SPDK_STATIC_ASSERT(sizeof(struct spdk_scsi_pr_in_read_header) == 8, "Incorrect size"); diff --git a/lib/scsi/scsi_pr.c b/lib/scsi/scsi_pr.c index 09410ad11..e89dcca90 100644 --- a/lib/scsi/scsi_pr.c +++ b/lib/scsi/scsi_pr.c @@ -581,7 +581,7 @@ spdk_scsi_pr_in_read_keys(struct spdk_scsi_task *task, uint8_t *data, to_be64(&keys->rkeys[count], reg->rkey); count++; } - to_be32(&keys->header.addiontal_len, count * 8); + to_be32(&keys->header.additional_len, count * 8); return (sizeof(keys->header) + count * 8); } @@ -605,7 +605,7 @@ spdk_scsi_pr_in_read_reservations(struct spdk_scsi_task *task, } else { to_be64(¶m->rkey, lun->reservation.crkey); } - to_be32(¶m->header.addiontal_len, 16); + to_be32(¶m->header.additional_len, 16); param->scope = SPDK_SCSI_PR_LU_SCOPE; param->type = lun->reservation.rtype; SPDK_DEBUGLOG(SPDK_LOG_SCSI, "READ RESERVATIONS with valid reservation\n"); @@ -613,7 +613,7 @@ spdk_scsi_pr_in_read_reservations(struct spdk_scsi_task *task, } /* no reservation */ - to_be32(¶m->header.addiontal_len, 0); + to_be32(¶m->header.additional_len, 0); SPDK_DEBUGLOG(SPDK_LOG_SCSI, "READ RESERVATIONS no reservation\n"); return sizeof(param->header); }