diff options
author | tangwenji <tang.wenji@zte.com.cn> | 2017-08-21 20:55:41 +0800 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2017-11-04 14:45:23 -0700 |
commit | 79dd6f2fd170e19f979d31cd1ebc9eea6de1a75f (patch) | |
tree | dc3f51977c37b8663b7ac69742940181516bf953 /drivers/target/target_core_transport.c | |
parent | e437fa3e5d1fde522fcc345ab1fe32a671b943f0 (diff) | |
download | linux-stable-79dd6f2fd170e19f979d31cd1ebc9eea6de1a75f.tar.gz linux-stable-79dd6f2fd170e19f979d31cd1ebc9eea6de1a75f.tar.bz2 linux-stable-79dd6f2fd170e19f979d31cd1ebc9eea6de1a75f.zip |
target: add sense code INSUFFICIENT REGISTRATION RESOURCES
If a PERSISTENT RESERVE OUT command with a REGISTER service action or a
REGISTER AND IGNORE EXISTING KEY service action or REGISTER AND MOVE
service action is attempted, but there are insufficient device server
resources to complete the operation, then the command shall be terminated
with CHECK CONDITION status, with the sense key set to ILLEGAL REQUEST,and
the additonal sense code set to INSUFFICIENT REGISTRATION RESOURCES.
Signed-off-by: tangwenji <tang.wenji@zte.com.cn>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/target_core_transport.c')
-rw-r--r-- | drivers/target/target_core_transport.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c index 836d552b0385..190f3ba23707 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c @@ -3145,6 +3145,21 @@ static const struct sense_info sense_info_table[] = { .key = NOT_READY, .asc = 0x08, /* LOGICAL UNIT COMMUNICATION FAILURE */ }, + [TCM_INSUFFICIENT_REGISTRATION_RESOURCES] = { + /* + * From spc4r22 section5.7.7,5.7.8 + * If a PERSISTENT RESERVE OUT command with a REGISTER service action + * or a REGISTER AND IGNORE EXISTING KEY service action or + * REGISTER AND MOVE service actionis attempted, + * but there are insufficient device server resources to complete the + * operation, then the command shall be terminated with CHECK CONDITION + * status, with the sense key set to ILLEGAL REQUEST,and the additonal + * sense code set to INSUFFICIENT REGISTRATION RESOURCES. + */ + .key = ILLEGAL_REQUEST, + .asc = 0x55, + .ascq = 0x04, /* INSUFFICIENT REGISTRATION RESOURCES */ + }, }; static int translate_sense_reason(struct se_cmd *cmd, sense_reason_t reason) |