diff options
author | Mike Christie <mchristi@redhat.com> | 2017-12-19 05:03:55 -0500 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2018-01-12 18:07:30 -0500 |
commit | d120c7083f49d177e6765afad543faa0f243590e (patch) | |
tree | 66a412ed835e221d54f814cc6399b0174475567c | |
parent | c1c390ba53195aef36e94b2354bc0e603057c293 (diff) |
target: add SAM_STAT_BUSY sense reason
Add SAM_STAT_BUSY sense_reason. The next patch will have
target_core_user return this value while it is temporarily
blocked and restarting.
Signed-off-by: Mike Christie <mchristi@redhat.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
-rw-r--r-- | drivers/target/target_core_transport.c | 3 | ||||
-rw-r--r-- | include/target/target_core_base.h | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c index 58caacd54a3b..74b646f165d4 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c | |||
@@ -1774,6 +1774,9 @@ void transport_generic_request_failure(struct se_cmd *cmd, | |||
1774 | case TCM_OUT_OF_RESOURCES: | 1774 | case TCM_OUT_OF_RESOURCES: |
1775 | cmd->scsi_status = SAM_STAT_TASK_SET_FULL; | 1775 | cmd->scsi_status = SAM_STAT_TASK_SET_FULL; |
1776 | goto queue_status; | 1776 | goto queue_status; |
1777 | case TCM_LUN_BUSY: | ||
1778 | cmd->scsi_status = SAM_STAT_BUSY; | ||
1779 | goto queue_status; | ||
1777 | case TCM_RESERVATION_CONFLICT: | 1780 | case TCM_RESERVATION_CONFLICT: |
1778 | /* | 1781 | /* |
1779 | * No SENSE Data payload for this case, set SCSI Status | 1782 | * No SENSE Data payload for this case, set SCSI Status |
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index 2c8d8115469d..00482f903dec 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h | |||
@@ -183,6 +183,7 @@ enum tcm_sense_reason_table { | |||
183 | TCM_TOO_MANY_SEGMENT_DESCS = R(0x1b), | 183 | TCM_TOO_MANY_SEGMENT_DESCS = R(0x1b), |
184 | TCM_UNSUPPORTED_SEGMENT_DESC_TYPE_CODE = R(0x1c), | 184 | TCM_UNSUPPORTED_SEGMENT_DESC_TYPE_CODE = R(0x1c), |
185 | TCM_INSUFFICIENT_REGISTRATION_RESOURCES = R(0x1d), | 185 | TCM_INSUFFICIENT_REGISTRATION_RESOURCES = R(0x1d), |
186 | TCM_LUN_BUSY = R(0x1e), | ||
186 | #undef R | 187 | #undef R |
187 | }; | 188 | }; |
188 | 189 | ||