]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
target: Don't force session reset if queue_depth does not change
authorNicholas Bellinger <nab@linux-iscsi.org>
Tue, 25 Apr 2017 20:52:45 +0000 (13:52 -0700)
committerNicholas Bellinger <nab@linux-iscsi.org>
Fri, 5 May 2017 03:01:40 +0000 (20:01 -0700)
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>
drivers/target/target_core_tpg.c

index dfaef4d3b2d2698088754c08f1846bc893815237..310d9e55c6eb76994879ebf0d23b1c4bbee0e8db 100644 (file)
@@ -397,6 +397,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