From bffb5128f91e820fd8804307a6431607c2c840a4 Mon Sep 17 00:00:00 2001 From: Nicholas Bellinger Date: Tue, 14 Apr 2015 11:52:22 -0700 Subject: target: Ensure sess_prot_type is saved across session restart The following incremental patch saves the current sess_prot_type into se_node_acl, and will always reset sess_prot_type if a previous saved value exists. So the PI setting for the fabric's session with backend devices not supporting PI is persistent across session restart. (Fix se_node_acl dereference for discovery sessions - DanCarpenter) Reviewed-by: Martin Petersen Reviewed-by: Sagi Grimberg Signed-off-by: Nicholas Bellinger --- include/target/target_core_base.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/target/target_core_base.h') diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index e1de142..480e9f8 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h @@ -589,6 +589,7 @@ struct se_node_acl { bool acl_stop:1; u32 queue_depth; u32 acl_index; + enum target_prot_type saved_prot_type; #define MAX_ACL_TAG_SIZE 64 char acl_tag[MAX_ACL_TAG_SIZE]; /* Used for PR SPEC_I_PT=1 and REGISTER_AND_MOVE */ -- cgit v1.1