public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: "Nicholas A. Bellinger" <nab@linux-iscsi.org>
To: target-devel <target-devel@vger.kernel.org>
Cc: linux-scsi <linux-scsi@vger.kernel.org>,
	lkml <linux-kernel@vger.kernel.org>, Gary Guo <ghg@datera.io>,
	Bill Borsari <wgb@datera.io>, Raghu Krishnamurthy <rk@datera.io>,
	Nicholas Bellinger <nab@linux-iscsi.org>
Subject: [PATCH 3/3] target: Don't force session reset if queue_depth does not change
Date: Wed,  3 May 2017 06:13:36 +0000	[thread overview]
Message-ID: <1493792016-6435-4-git-send-email-nab@linux-iscsi.org> (raw)
In-Reply-To: <1493792016-6435-1-git-send-email-nab@linux-iscsi.org>

From: Nicholas Bellinger <nab@linux-iscsi.org>

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 | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/target/target_core_tpg.c b/drivers/target/target_core_tpg.c
index dfaef4d..310d9e5 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.
-- 
1.9.1

      parent reply	other threads:[~2017-05-03  6:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-03  6:13 [PATCH 0/3] target: Fixes for v4.12-rc1 Nicholas A. Bellinger
2017-05-03  6:13 ` [PATCH 1/3] target: Fix compare_and_write_callback handling for non GOOD status Nicholas A. Bellinger
2017-05-03  6:13 ` [PATCH 2/3] iscsi-target: Set session_fall_back_to_erl0 when forcing reinstatement Nicholas A. Bellinger
2017-05-03  6:13 ` Nicholas A. Bellinger [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1493792016-6435-4-git-send-email-nab@linux-iscsi.org \
    --to=nab@linux-iscsi.org \
    --cc=ghg@datera.io \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=rk@datera.io \
    --cc=target-devel@vger.kernel.org \
    --cc=wgb@datera.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox