From patchwork Fri Mar 27 08:05:11 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Nicholas A. Bellinger" X-Patchwork-Id: 6104091 Return-Path: X-Original-To: patchwork-linux-scsi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 3D72E9F399 for ; Fri, 27 Mar 2015 08:07:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 33D102013A for ; Fri, 27 Mar 2015 08:07:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F315B2037C for ; Fri, 27 Mar 2015 08:07:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753714AbbC0IHP (ORCPT ); Fri, 27 Mar 2015 04:07:15 -0400 Received: from mail-ob0-f171.google.com ([209.85.214.171]:32895 "EHLO mail-ob0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753580AbbC0IGd (ORCPT ); Fri, 27 Mar 2015 04:06:33 -0400 Received: by obvd1 with SMTP id d1so1601404obv.0 for ; Fri, 27 Mar 2015 01:06:33 -0700 (PDT) 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=8o1cSuHls8YltVNWTA/SCrQpMci8P2syyavvnxgN18k=; b=DejzXYqhjNVCQWsCsL+2ldJb0v0osy5IchXI5F4uU10OC6v+ZSGmo4HbiN3bNWAzM1 ofBYcTgjH3Qrnml2NtypL74Ntu6uP0hZCt5HWDVISqJ3NXutp9wMRLuWoV8FquYtPyxT KK5enPogUpQyHYbkpkv4SYQs6BUrLSsyQuj7jQXpO9l/BnToP2is7Ohgtp3uiVkt1Pb9 t74SpcKFwa4NZNum7pMD+o9o2m7ftWyJiRxCiAs6NRa9KRMvZf7NussjEqKzByYIYWi0 rO/IIF72pIYan5sQfUSuMjqCgtHv8Cp+wSU5/Wb1AzywkFS+S3U/yKPBb0bH4C3isrTB u+GA== X-Gm-Message-State: ALoCoQkghVf/UlT6yZRr01Q3AvJIJ9j6HedVo/fTe936GI4GbZoVb3qELZlP9vBiGgybovCMpCiy X-Received: by 10.60.70.161 with SMTP id n1mr15273876oeu.28.1427443593156; Fri, 27 Mar 2015 01:06:33 -0700 (PDT) Received: from localhost.localdomain (mail.linux-iscsi.org. [67.23.28.174]) by mx.google.com with ESMTPSA id h4sm711520obr.18.2015.03.27.01.06.32 (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 27 Mar 2015 01:06:32 -0700 (PDT) From: "Nicholas A. Bellinger" To: target-devel Cc: linux-scsi , Hannes Reinecke , Christoph Hellwig , Sagi Grimberg , Nicholas Bellinger Subject: [RFC 21/22] target: Rename se_node_acl->lun_entry_hlist to target_* prefix Date: Fri, 27 Mar 2015 08:05:11 +0000 Message-Id: <1427443512-8925-22-git-send-email-nab@daterainc.com> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1427443512-8925-1-git-send-email-nab@daterainc.com> References: <1427443512-8925-1-git-send-email-nab@daterainc.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=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, 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: Nicholas Bellinger This includes: - target_add_node_to_devs - target_get_deve_from_rtpi - target_create_device_list_for_node - target_free_device_list_for_node - target_enable_device_list_for_node - target_disable_device_list_for_node Signed-off-by: Nicholas Bellinger --- drivers/target/target_core_device.c | 22 +++++++++++----------- drivers/target/target_core_internal.h | 12 ++++++------ drivers/target/target_core_pr.c | 6 +++--- drivers/target/target_core_tpg.c | 28 ++++++++++++++-------------- drivers/target/target_core_transport.c | 2 +- 5 files changed, 35 insertions(+), 35 deletions(-) diff --git a/drivers/target/target_core_device.c b/drivers/target/target_core_device.c index 3647e7c..5b225d8 100644 --- a/drivers/target/target_core_device.c +++ b/drivers/target/target_core_device.c @@ -207,7 +207,7 @@ EXPORT_SYMBOL(target_lookup_tmr_lun); * and core_scsi3_decode_spec_i_port(), and will increment &deve->pr_ref_count * when a matching rtpi is found. */ -struct se_dev_entry *core_get_se_deve_from_rtpi( +struct se_dev_entry *target_get_deve_from_rtpi( struct se_node_acl *nacl, u16 rtpi) { @@ -257,7 +257,7 @@ struct se_dev_entry *core_get_se_deve_from_rtpi( return NULL; } -int core_free_device_list_for_node( +int target_free_device_list_for_node( struct se_node_acl *nacl, struct se_portal_group *tpg) { @@ -287,7 +287,7 @@ int core_free_device_list_for_node( mapped_lun = deve->mapped_lun; rcu_read_unlock(); - core_disable_device_list_for_node(lun, NULL, mapped_lun, + target_disable_device_list_for_node(lun, NULL, mapped_lun, TRANSPORT_LUNFLAGS_NO_ACCESS, nacl, tpg); } @@ -325,11 +325,11 @@ static void target_pr_ref_release(struct percpu_ref *ref) complete(&deve->pr_comp); } -/* core_enable_device_list_for_node(): +/* target_enable_device_list_for_node(): * * */ -int core_enable_device_list_for_node( +int target_enable_device_list_for_node( struct se_lun *lun, struct se_lun_acl *lun_acl, u32 mapped_lun, @@ -394,11 +394,11 @@ int core_enable_device_list_for_node( return 0; } -/* core_disable_device_list_for_node(): +/* target_disable_device_list_for_node(): * * */ -int core_disable_device_list_for_node( +int target_disable_device_list_for_node( struct se_lun *lun, struct se_lun_acl *lun_acl, u32 mapped_lun, @@ -479,7 +479,7 @@ void target_clear_lun_from_tpg(struct se_lun *lun, struct se_portal_group *tpg) mapped_lun = deve->mapped_lun; rcu_read_unlock(); - core_disable_device_list_for_node(lun, NULL, mapped_lun, + target_disable_device_list_for_node(lun, NULL, mapped_lun, TRANSPORT_LUNFLAGS_NO_ACCESS, nacl, tpg); } } @@ -1232,7 +1232,7 @@ struct se_lun *core_dev_add_lun( if (acl->dynamic_node_acl && (!tpg->se_tpg_tfo->tpg_check_demo_mode_login_only || !tpg->se_tpg_tfo->tpg_check_demo_mode_login_only(tpg))) { - core_tpg_add_node_to_devs(acl, tpg); + target_add_node_to_devs(acl, tpg); } } mutex_unlock(&tpg->acl_node_mutex); @@ -1374,7 +1374,7 @@ int core_dev_add_initiator_node_lun_acl( lacl->se_lun = lun; - if (core_enable_device_list_for_node(lun, lacl, lacl->mapped_lun, + if (target_enable_device_list_for_node(lun, lacl, lacl->mapped_lun, lun_access, nacl, tpg) < 0) return -EINVAL; @@ -1407,7 +1407,7 @@ int core_dev_del_initiator_node_lun_acl( if (!nacl) return -EINVAL; - core_disable_device_list_for_node(lun, NULL, lacl->mapped_lun, + target_disable_device_list_for_node(lun, NULL, lacl->mapped_lun, TRANSPORT_LUNFLAGS_NO_ACCESS, nacl, tpg); lacl->se_lun = NULL; diff --git a/drivers/target/target_core_internal.h b/drivers/target/target_core_internal.h index 70190e2..6c8b7fb 100644 --- a/drivers/target/target_core_internal.h +++ b/drivers/target/target_core_internal.h @@ -5,13 +5,13 @@ extern struct t10_alua_lu_gp *default_lu_gp; /* target_core_device.c */ -struct se_dev_entry *core_get_se_deve_from_rtpi(struct se_node_acl *, u16); -int core_free_device_list_for_node(struct se_node_acl *, +struct se_dev_entry *target_get_deve_from_rtpi(struct se_node_acl *, u16); +int target_free_device_list_for_node(struct se_node_acl *, struct se_portal_group *); void core_update_device_list_access(u32, u32, struct se_node_acl *); -int core_enable_device_list_for_node(struct se_lun *, struct se_lun_acl *, - u32, u32, struct se_node_acl *, struct se_portal_group *); -int core_disable_device_list_for_node(struct se_lun *, struct se_lun_acl *, +int target_enable_device_list_for_node(struct se_lun *, struct se_lun_acl *, + u32, u32, struct se_node_acl *, struct se_portal_group *); +int target_disable_device_list_for_node(struct se_lun *, struct se_lun_acl *, u32, u32, struct se_node_acl *, struct se_portal_group *); void target_clear_lun_from_tpg(struct se_lun *, struct se_portal_group *); int core_dev_export(struct se_device *, struct se_portal_group *, @@ -50,7 +50,7 @@ extern struct se_device *g_lun0_dev; struct se_node_acl *__target_get_initiator_node_acl(struct se_portal_group *tpg, const char *); -void core_tpg_add_node_to_devs(struct se_node_acl *, struct se_portal_group *); +void target_add_node_to_devs(struct se_node_acl *, struct se_portal_group *); void core_tpg_wait_for_nacl_pr_ref(struct se_node_acl *); struct se_lun *core_tpg_alloc_lun(struct se_portal_group *, u32); int target_add_lun(struct se_portal_group *, struct se_lun *, diff --git a/drivers/target/target_core_pr.c b/drivers/target/target_core_pr.c index 3a5ee0b..29c2fc7 100644 --- a/drivers/target/target_core_pr.c +++ b/drivers/target/target_core_pr.c @@ -1669,8 +1669,8 @@ core_scsi3_decode_spec_i_port( * RELATIVE TARGET PORT IDENTIFIER on the receiving I_T Nexus * Target Port. */ - dest_se_deve = core_get_se_deve_from_rtpi(dest_node_acl, - dest_rtpi); + dest_se_deve = target_get_deve_from_rtpi(dest_node_acl, + dest_rtpi); if (!dest_se_deve) { pr_err("Unable to locate %s dest_se_deve" " from destination RTPI: %hu\n", @@ -3374,7 +3374,7 @@ after_iport_check: * Locate the struct se_dev_entry pointer for the matching RELATIVE TARGET * PORT IDENTIFIER. */ - dest_se_deve = core_get_se_deve_from_rtpi(dest_node_acl, rtpi); + dest_se_deve = target_get_deve_from_rtpi(dest_node_acl, rtpi); if (!dest_se_deve) { pr_err("Unable to locate %s dest_se_deve from RTPI:" " %hu\n", dest_tf_ops->get_fabric_name(), rtpi); diff --git a/drivers/target/target_core_tpg.c b/drivers/target/target_core_tpg.c index 9d31434..b10071d 100644 --- a/drivers/target/target_core_tpg.c +++ b/drivers/target/target_core_tpg.c @@ -78,7 +78,7 @@ static void target_clear_initiator_node_from_tpg( mapped_lun = deve->mapped_lun; rcu_read_unlock(); - core_disable_device_list_for_node(lun, NULL, mapped_lun, + target_disable_device_list_for_node(lun, NULL, mapped_lun, TRANSPORT_LUNFLAGS_NO_ACCESS, nacl, tpg); } } @@ -119,11 +119,11 @@ struct se_node_acl *target_get_initiator_node_acl( } EXPORT_SYMBOL(target_get_initiator_node_acl); -/* core_tpg_add_node_to_devs(): +/* target_add_node_to_devs(): * * */ -void core_tpg_add_node_to_devs( +void target_add_node_to_devs( struct se_node_acl *acl, struct se_portal_group *tpg) { @@ -163,8 +163,8 @@ void core_tpg_add_node_to_devs( (lun_access == TRANSPORT_LUNFLAGS_READ_WRITE) ? "READ-WRITE" : "READ-ONLY"); - core_enable_device_list_for_node(lun, NULL, lun->unpacked_lun, - lun_access, acl, tpg); + target_enable_device_list_for_node(lun, NULL, lun->unpacked_lun, + lun_access, acl, tpg); /* * Check to see if there are any existing persistent reservation * APTPL pre-registrations that need to be enabled for this dynamic @@ -222,11 +222,11 @@ static void *array_zalloc(int n, size_t size, gfp_t flags) return a; } -/* core_create_device_list_for_node(): +/* target_create_device_list_for_node(): * * */ -static int core_create_device_list_for_node(struct se_node_acl *nacl) +static int target_create_device_list_for_node(struct se_node_acl *nacl) { struct se_dev_entry *deve; int i; @@ -286,13 +286,13 @@ struct se_node_acl *target_check_initiator_node_acl( tpg->se_tpg_tfo->set_default_node_attributes(acl); - if (core_create_device_list_for_node(acl) < 0) { + if (target_create_device_list_for_node(acl) < 0) { tpg->se_tpg_tfo->tpg_release_fabric_acl(tpg, acl); return NULL; } if (core_set_queue_depth_for_node(tpg, acl) < 0) { - core_free_device_list_for_node(acl, tpg); + target_free_device_list_for_node(acl, tpg); tpg->se_tpg_tfo->tpg_release_fabric_acl(tpg, acl); return NULL; } @@ -303,7 +303,7 @@ struct se_node_acl *target_check_initiator_node_acl( */ if ((tpg->se_tpg_tfo->tpg_check_demo_mode_login_only == NULL) || (tpg->se_tpg_tfo->tpg_check_demo_mode_login_only(tpg) != 1)) - core_tpg_add_node_to_devs(acl, tpg); + target_add_node_to_devs(acl, tpg); mutex_lock(&tpg->acl_node_mutex); list_add_tail(&acl->acl_list, &tpg->acl_node_list); @@ -391,13 +391,13 @@ struct se_node_acl *target_add_initiator_node_acl( tpg->se_tpg_tfo->set_default_node_attributes(acl); - if (core_create_device_list_for_node(acl) < 0) { + if (target_create_device_list_for_node(acl) < 0) { tpg->se_tpg_tfo->tpg_release_fabric_acl(tpg, acl); return ERR_PTR(-ENOMEM); } if (core_set_queue_depth_for_node(tpg, acl) < 0) { - core_free_device_list_for_node(acl, tpg); + target_free_device_list_for_node(acl, tpg); tpg->se_tpg_tfo->tpg_release_fabric_acl(tpg, acl); return ERR_PTR(-EINVAL); } @@ -470,7 +470,7 @@ int target_del_initiator_node_acl( core_tpg_wait_for_nacl_pr_ref(acl); target_clear_initiator_node_from_tpg(acl, tpg); - core_free_device_list_for_node(acl, tpg); + target_free_device_list_for_node(acl, tpg); pr_debug("%s_TPG[%hu] - Deleted ACL with TCQ Depth: %d for %s" " Initiator Node: %s\n", tpg->se_tpg_tfo->get_fabric_name(), @@ -739,7 +739,7 @@ int target_deregister_tpg(struct se_portal_group *se_tpg) se_tpg->num_node_acls--; core_tpg_wait_for_nacl_pr_ref(nacl); - core_free_device_list_for_node(nacl, se_tpg); + target_free_device_list_for_node(nacl, se_tpg); se_tpg->se_tpg_tfo->tpg_release_fabric_acl(se_tpg, nacl); } diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c index 86d4aeb..64f2f87 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c @@ -505,7 +505,7 @@ void transport_deregister_session(struct se_session *se_sess) if (drop_nacl) { core_tpg_wait_for_nacl_pr_ref(se_nacl); - core_free_device_list_for_node(se_nacl, se_tpg); + target_free_device_list_for_node(se_nacl, se_tpg); se_tfo->tpg_release_fabric_acl(se_tpg, se_nacl); comp_nacl = false; }