summaryrefslogtreecommitdiffstats
path: root/drivers/target
diff options
context:
space:
mode:
authorNicholas Bellinger <nab@linux-iscsi.org>2017-04-25 22:52:45 +0200
committerNicholas Bellinger <nab@linux-iscsi.org>2017-05-05 05:01:40 +0200
commit46861cdd80e1a862dc65d10833a1450861fabef7 (patch)
tree53c310cf99dfbcc6a5aea3c9b199c263211cac8e /drivers/target
parentiscsi-target: Set session_fall_back_to_erl0 when forcing reinstatement (diff)
downloadlinux-46861cdd80e1a862dc65d10833a1450861fabef7.tar.xz
linux-46861cdd80e1a862dc65d10833a1450861fabef7.zip
target: Don't force session reset if queue_depth does not change
Keeping in the idempotent nature of target_core_fabric_configfs.c, if a queue_depth value is set and it's the same as the existing value, don't attempt to force session reinstatement. Reported-by: Raghu Krishnamurthy <rk@datera.io> Cc: Raghu Krishnamurthy <rk@datera.io> Tested-by: Gary Guo <ghg@datera.io> Cc: Gary Guo <ghg@datera.io> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target')
-rw-r--r--drivers/target/target_core_tpg.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/target/target_core_tpg.c b/drivers/target/target_core_tpg.c
index dfaef4d3b2d2..310d9e55c6eb 100644
--- a/drivers/target/target_core_tpg.c
+++ b/drivers/target/target_core_tpg.c
@@ -398,6 +398,13 @@ int core_tpg_set_initiator_node_queue_depth(
struct se_portal_group *tpg = acl->se_tpg;
/*
+ * Allow the setting of se_node_acl queue_depth to be idempotent,
+ * and not force a session shutdown event if the value is not
+ * changing.
+ */
+ if (acl->queue_depth == queue_depth)
+ return 0;
+ /*
* User has requested to change the queue depth for a Initiator Node.
* Change the value in the Node's struct se_node_acl, and call
* target_set_nacl_queue_depth() to set the new queue depth.