From patchwork Mon Jul 20 23:29:50 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Spencer Baugh X-Patchwork-Id: 6831351 Return-Path: X-Original-To: patchwork-linux-scsi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 5C53CC05AC for ; Mon, 20 Jul 2015 23:30:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6D58F2069F for ; Mon, 20 Jul 2015 23:30:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6F9A42069D for ; Mon, 20 Jul 2015 23:30:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757324AbbGTXaG (ORCPT ); Mon, 20 Jul 2015 19:30:06 -0400 Received: from mail-pd0-f172.google.com ([209.85.192.172]:34399 "EHLO mail-pd0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757247AbbGTXaE (ORCPT ); Mon, 20 Jul 2015 19:30:04 -0400 Received: by pdbbh15 with SMTP id bh15so63180700pdb.1 for ; Mon, 20 Jul 2015 16:30:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=purestorage.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=gp1sqNnb/cSAfLl/SExg+PXJdiaK7SD1VOh1IoDhhVk=; b=Udg0uYt5OQh8EaZbYG9szm+jDUSOEz4Hg6YwLEiQviUbvSrxif2FvSoOBFiNsVXbdA 4+sISPL+9e7ExOHd/6zoXB1xlK51wl68dpM5jZOP6OnEP9xdQX/j/A1vlNq/ZvLGJB3Z jJ957Rpx7ar48AX7xs0XCYNzP2gcDLf/uOjR8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=gp1sqNnb/cSAfLl/SExg+PXJdiaK7SD1VOh1IoDhhVk=; b=hwDypPyUqVr+WycEw+Fjd9XQzLXKqHNb/oJd0qBbrvsKljkx9/94QvY3AkH81lLzEP grakuMHcvuRoNviOiD8jg83V4GkOZaf4z/HH1MEG4KJW88XNV7vHLuV3zQw0QIrmkKMm gdnLHbzeOOdoU7Qw1QJXNesDizReCMLaH5YfKYTbmstUR3QO966oeoldmY2jbd559+8p 1eChxy5P+Ph9oiym7hcXznrIGNUlFTlcL4iW5HX/qdWxJDKiLeF6Na1Bgw223Zx3yzDU pgP+H0X7RximSIBFdfDeeZC466vSAy3eBZLkINJjrpmb+dDdz5+3QQImWbke2ieMABKz NdQA== X-Gm-Message-State: ALoCoQmVEf+l0b/fXduVt+h5wrI6LWwfL664DplfkkjEI2bNw9QD9mqUbqFK26rNngW/0WlFKi+I X-Received: by 10.70.44.41 with SMTP id b9mr65362258pdm.73.1437435003617; Mon, 20 Jul 2015 16:30:03 -0700 (PDT) Received: from localhost (50-206-43-50-static.hfc.comcastbusiness.net. [50.206.43.50]) by smtp.gmail.com with ESMTPSA id f4sm23732515pdc.95.2015.07.20.16.30.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 Jul 2015 16:30:02 -0700 (PDT) From: Spencer Baugh X-Google-Original-From: Spencer Baugh To: "Nicholas A. Bellinger" , linux-scsi@vger.kernel.org (open list:TARGET SUBSYSTEM), target-devel@vger.kernel.org (open list:TARGET SUBSYSTEM), linux-kernel@vger.kernel.org (open list) Cc: Spencer Baugh , Chris Zankel Subject: [PATCH 2/2] target: remove initiatorname field in se_acl_lun Date: Mon, 20 Jul 2015 16:29:50 -0700 Message-Id: <1437434990-13452-2-git-send-email-Spencer.baugh@purestorage.com> X-Mailer: git-send-email 2.4.3 In-Reply-To: <1437434990-13452-1-git-send-email-Spencer.baugh@purestorage.com> References: <1437434990-13452-1-git-send-email-Spencer.baugh@purestorage.com> Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Spam-Status: No, score=-8.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Spencer Baugh From: Chris Zankel The initiatorname field in se_acl_lun is only a copy of the same field in se_node_acl, so remove it and use the version in se_node_acl where needed (it's actually only used for pr_debug) Signed-off-by: Chris Zankel --- drivers/target/target_core_device.c | 8 +++----- drivers/target/target_core_fabric_configfs.c | 2 +- include/target/target_core_base.h | 1 - 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/target/target_core_device.c b/drivers/target/target_core_device.c index 09e682b..c4a8db6 100644 --- a/drivers/target/target_core_device.c +++ b/drivers/target/target_core_device.c @@ -620,8 +620,6 @@ struct se_lun_acl *core_dev_init_initiator_node_lun_acl( lacl->mapped_lun = mapped_lun; lacl->se_lun_nacl = nacl; - snprintf(lacl->initiatorname, TRANSPORT_IQN_LEN, "%s", - nacl->initiatorname); return lacl; } @@ -656,7 +654,7 @@ int core_dev_add_initiator_node_lun_acl( " InitiatorNode: %s\n", tpg->se_tpg_tfo->get_fabric_name(), tpg->se_tpg_tfo->tpg_get_tag(tpg), lun->unpacked_lun, lacl->mapped_lun, (lun_access & TRANSPORT_LUNFLAGS_READ_WRITE) ? "RW" : "RO", - lacl->initiatorname); + nacl->initiatorname); /* * Check to see if there are any existing persistent reservation APTPL * pre-registrations that need to be enabled for this LUN ACL.. @@ -688,7 +686,7 @@ int core_dev_del_initiator_node_lun_acl( " InitiatorNode: %s Mapped LUN: %llu\n", tpg->se_tpg_tfo->get_fabric_name(), tpg->se_tpg_tfo->tpg_get_tag(tpg), lun->unpacked_lun, - lacl->initiatorname, lacl->mapped_lun); + nacl->initiatorname, lacl->mapped_lun); return 0; } @@ -701,7 +699,7 @@ void core_dev_free_initiator_node_lun_acl( " Mapped LUN: %llu\n", tpg->se_tpg_tfo->get_fabric_name(), tpg->se_tpg_tfo->tpg_get_tag(tpg), tpg->se_tpg_tfo->get_fabric_name(), - lacl->initiatorname, lacl->mapped_lun); + lacl->se_lun_nacl->initiatorname, lacl->mapped_lun); kfree(lacl); } diff --git a/drivers/target/target_core_fabric_configfs.c b/drivers/target/target_core_fabric_configfs.c index 48a3698..be42429 100644 --- a/drivers/target/target_core_fabric_configfs.c +++ b/drivers/target/target_core_fabric_configfs.c @@ -203,7 +203,7 @@ static ssize_t target_fabric_mappedlun_store_write_protect( pr_debug("%s_ConfigFS: Changed Initiator ACL: %s" " Mapped LUN: %llu Write Protect bit to %s\n", se_tpg->se_tpg_tfo->get_fabric_name(), - lacl->initiatorname, lacl->mapped_lun, (op) ? "ON" : "OFF"); + se_nacl->initiatorname, lacl->mapped_lun, (op) ? "ON" : "OFF"); return count; diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index 0a7c44e..b59b61a 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h @@ -598,7 +598,6 @@ struct se_ml_stat_grps { }; struct se_lun_acl { - char initiatorname[TRANSPORT_IQN_LEN]; u64 mapped_lun; struct se_node_acl *se_lun_nacl; struct se_lun *se_lun;