From patchwork Wed May 3 06:13:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Nicholas A. Bellinger" X-Patchwork-Id: 9708927 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E801360351 for ; Wed, 3 May 2017 06:13:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D8417285EE for ; Wed, 3 May 2017 06:13:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CCAD5285F2; Wed, 3 May 2017 06:13:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7F66D285EE for ; Wed, 3 May 2017 06:13:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751394AbdECGMp (ORCPT ); Wed, 3 May 2017 02:12:45 -0400 Received: from mail.linux-iscsi.org ([67.23.28.174]:42696 "EHLO linux-iscsi.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751866AbdECGMH (ORCPT ); Wed, 3 May 2017 02:12:07 -0400 Received: from linux-iscsi.org (localhost [127.0.0.1]) by linux-iscsi.org (Postfix) with ESMTP id C720440B0A; Wed, 3 May 2017 06:13:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=linux-iscsi.org; s=default.private; t=1493792021; bh=R3o+ScQPWAtbTGO97Ua/6dt0OtUTbZc zi7kdB0CVPAw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To: References; b=0bh+Fa35nuX+pZn+VsgAN4UG2RmggOL7gvi5fuaReazDicwedwUE hoPo8pLUp87s3sfhS3L4VsSKXDqX+yccbeN+XWz3kwvOBjxkEEc/ePdlCAGwwELmGtf D9Ct4j+3DYFZmaRAYrI3fzB0ZhuZ7vbr3oCq+MZnSw1lHXuymxR4= From: "Nicholas A. Bellinger" To: target-devel Cc: linux-scsi , lkml , Gary Guo , Bill Borsari , Raghu Krishnamurthy , Nicholas Bellinger 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 Message-Id: <1493792016-6435-4-git-send-email-nab@linux-iscsi.org> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1493792016-6435-1-git-send-email-nab@linux-iscsi.org> References: <1493792016-6435-1-git-send-email-nab@linux-iscsi.org> Sender: target-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: target-devel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Nicholas Bellinger 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 Cc: Raghu Krishnamurthy Tested-by: Gary Guo Cc: Gary Guo Signed-off-by: Nicholas Bellinger --- 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.