From patchwork Wed Oct 17 15:48:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Disseldorp X-Patchwork-Id: 10645773 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8A8D4112B for ; Wed, 17 Oct 2018 15:48:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7AAF826E76 for ; Wed, 17 Oct 2018 15:48:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6EF9926E79; Wed, 17 Oct 2018 15:48:29 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI 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 1B25427861 for ; Wed, 17 Oct 2018 15:48:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727844AbeJQXop (ORCPT ); Wed, 17 Oct 2018 19:44:45 -0400 Received: from mx2.suse.de ([195.135.220.15]:41956 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727048AbeJQXop (ORCPT ); Wed, 17 Oct 2018 19:44:45 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 1B093AFB3; Wed, 17 Oct 2018 15:48:26 +0000 (UTC) From: David Disseldorp To: target-devel@vger.kernel.org Cc: martin.petersen@oracle.com, linux-scsi@vger.kernel.org, David Disseldorp Subject: [RFC PATCH 1/3] target: remove unused session digest-errors metric Date: Wed, 17 Oct 2018 17:48:18 +0200 Message-Id: <20181017154820.9722-2-ddiss@suse.de> X-Mailer: git-send-email 2.13.7 In-Reply-To: <20181017154820.9722-1-ddiss@suse.de> References: <20181017154820.9722-1-ddiss@suse.de> Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: David Disseldorp --- drivers/target/iscsi/iscsi_target_stat.c | 14 +------------- include/target/iscsi/iscsi_target_stat.h | 2 -- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/drivers/target/iscsi/iscsi_target_stat.c b/drivers/target/iscsi/iscsi_target_stat.c index df0a39811dc2..ce60d123aa90 100644 --- a/drivers/target/iscsi/iscsi_target_stat.c +++ b/drivers/target/iscsi/iscsi_target_stat.c @@ -103,8 +103,7 @@ static ssize_t iscsi_stat_instance_fail_sess_show(struct config_item *item, u32 sess_err_count; spin_lock_bh(&sess_err->lock); - sess_err_count = (sess_err->digest_errors + - sess_err->cxn_timeout_errors + + sess_err_count = (sess_err->cxn_timeout_errors + sess_err->pdu_format_errors); spin_unlock_bh(&sess_err->lock); @@ -209,15 +208,6 @@ static ssize_t iscsi_stat_sess_err_inst_show(struct config_item *item, iscsi_sess_err_tiqn(item)->tiqn_index); } -static ssize_t iscsi_stat_sess_err_digest_errors_show(struct config_item *item, - char *page) -{ - struct iscsi_tiqn *tiqn = iscsi_sess_err_tiqn(item); - struct iscsi_sess_err_stats *sess_err = &tiqn->sess_err_stats; - - return snprintf(page, PAGE_SIZE, "%u\n", sess_err->digest_errors); -} - static ssize_t iscsi_stat_sess_err_cxn_errors_show(struct config_item *item, char *page) { @@ -237,13 +227,11 @@ static ssize_t iscsi_stat_sess_err_format_errors_show(struct config_item *item, } CONFIGFS_ATTR_RO(iscsi_stat_sess_err_, inst); -CONFIGFS_ATTR_RO(iscsi_stat_sess_err_, digest_errors); CONFIGFS_ATTR_RO(iscsi_stat_sess_err_, cxn_errors); CONFIGFS_ATTR_RO(iscsi_stat_sess_err_, format_errors); static struct configfs_attribute *iscsi_stat_sess_err_attrs[] = { &iscsi_stat_sess_err_attr_inst, - &iscsi_stat_sess_err_attr_digest_errors, &iscsi_stat_sess_err_attr_cxn_errors, &iscsi_stat_sess_err_attr_format_errors, NULL, diff --git a/include/target/iscsi/iscsi_target_stat.h b/include/target/iscsi/iscsi_target_stat.h index 4d75a2c426ca..b2d0f190483d 100644 --- a/include/target/iscsi/iscsi_target_stat.h +++ b/include/target/iscsi/iscsi_target_stat.h @@ -22,14 +22,12 @@ extern const struct config_item_type iscsi_stat_sess_cit; /* iSCSI session error types */ #define ISCSI_SESS_ERR_UNKNOWN 0 -#define ISCSI_SESS_ERR_DIGEST 1 #define ISCSI_SESS_ERR_CXN_TIMEOUT 2 #define ISCSI_SESS_ERR_PDU_FORMAT 3 /* iSCSI session error stats */ struct iscsi_sess_err_stats { spinlock_t lock; - u32 digest_errors; u32 cxn_timeout_errors; u32 pdu_format_errors; u32 last_sess_failure_type;