]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
target: add SAM_STAT_BUSY sense reason
authorMike Christie <mchristi@redhat.com>
Tue, 19 Dec 2017 10:03:55 +0000 (04:03 -0600)
committerNicholas Bellinger <nab@linux-iscsi.org>
Fri, 12 Jan 2018 23:07:30 +0000 (15:07 -0800)
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>
drivers/target/target_core_transport.c
include/target/target_core_base.h

index 58caacd54a3b2a650061d558097d1179e1031035..74b646f165d4e4fea16c955884dcf2a119cb82c3 100644 (file)
@@ -1774,6 +1774,9 @@ void transport_generic_request_failure(struct se_cmd *cmd,
        case TCM_OUT_OF_RESOURCES:
                cmd->scsi_status = SAM_STAT_TASK_SET_FULL;
                goto queue_status;
+       case TCM_LUN_BUSY:
+               cmd->scsi_status = SAM_STAT_BUSY;
+               goto queue_status;
        case TCM_RESERVATION_CONFLICT:
                /*
                 * No SENSE Data payload for this case, set SCSI Status
index 2c8d8115469dce4c2fc92bbf2ee91a1e0bccae5f..00482f903decba073d5837af821bd5d724a8b3d0 100644 (file)
@@ -183,6 +183,7 @@ enum tcm_sense_reason_table {
        TCM_TOO_MANY_SEGMENT_DESCS              = R(0x1b),
        TCM_UNSUPPORTED_SEGMENT_DESC_TYPE_CODE  = R(0x1c),
        TCM_INSUFFICIENT_REGISTRATION_RESOURCES = R(0x1d),
+       TCM_LUN_BUSY                            = R(0x1e),
 #undef R
 };