diff --git a/include/spdk/iscsi_spec.h b/include/spdk/iscsi_spec.h index 8714d33ea..c81a81241 100644 --- a/include/spdk/iscsi_spec.h +++ b/include/spdk/iscsi_spec.h @@ -310,9 +310,9 @@ struct iscsi_bhs_scsi_req { uint8_t reserved : 1; uint8_t attribute : 3; uint8_t reserved2 : 2; - uint8_t write : 1; - uint8_t read : 1; - uint8_t final : 1; + uint8_t write_bit : 1; + uint8_t read_bit : 1; + uint8_t final_bit : 1; uint8_t res[2]; uint8_t total_ahs_len; uint8_t data_segment_len[3]; diff --git a/lib/iscsi/iscsi.c b/lib/iscsi/iscsi.c index 687b49033..0b09e0104 100644 --- a/lib/iscsi/iscsi.c +++ b/lib/iscsi/iscsi.c @@ -2935,9 +2935,9 @@ spdk_iscsi_op_scsi(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pdu) reqh = (struct iscsi_bhs_scsi_req *)&pdu->bhs; - F_bit = reqh->final; - R_bit = reqh->read; - W_bit = reqh->write; + F_bit = reqh->final_bit; + R_bit = reqh->read_bit; + W_bit = reqh->write_bit; lun = from_be64(&reqh->lun); task_tag = from_be32(&reqh->itt); transfer_len = from_be32(&reqh->expected_data_xfer_len); diff --git a/lib/iscsi/task.h b/lib/iscsi/task.h index 5439b3e98..7d5df1849 100644 --- a/lib/iscsi/task.h +++ b/lib/iscsi/task.h @@ -145,7 +145,7 @@ spdk_iscsi_task_is_read(struct spdk_iscsi_task *task) struct iscsi_bhs_scsi_req *scsi_req; scsi_req = (struct iscsi_bhs_scsi_req *)spdk_iscsi_task_get_bhs(task); - return (scsi_req->read == 1); + return (scsi_req->read_bit == 1); } static inline uint32_t diff --git a/test/unit/lib/iscsi/iscsi.c/iscsi_ut.c b/test/unit/lib/iscsi/iscsi.c/iscsi_ut.c index b7c842b30..5485d790c 100644 --- a/test/unit/lib/iscsi/iscsi.c/iscsi_ut.c +++ b/test/unit/lib/iscsi/iscsi.c/iscsi_ut.c @@ -145,8 +145,8 @@ maxburstlength_test(void) to_be32(&req->cmd_sn, 0); to_be32(&req->expected_data_xfer_len, 1028); to_be32(&req->itt, 0x1234); - req->write = 1; - req->final = 1; + req->write_bit = 1; + req->final_bit = 1; g_spdk_iscsi.MaxRecvDataSegmentLength = 1024;