From patchwork Fri Mar 27 08:05:12 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: 6104101 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 6509BBF90F for ; Fri, 27 Mar 2015 08:07:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 63D692013A for ; Fri, 27 Mar 2015 08:07:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 364A9203FB for ; Fri, 27 Mar 2015 08:07:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753718AbbC0IHW (ORCPT ); Fri, 27 Mar 2015 04:07:22 -0400 Received: from mail-ob0-f169.google.com ([209.85.214.169]:32907 "EHLO mail-ob0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753644AbbC0IGf (ORCPT ); Fri, 27 Mar 2015 04:06:35 -0400 Received: by obvd1 with SMTP id d1so1601712obv.0 for ; Fri, 27 Mar 2015 01:06:34 -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=Ad41zVcNxZm/wvNDvucyI+M0OCYiU0M54gZ3ifgERTk=; b=DhewlpUnXPDvtGJpeFDBoyoNAdCUP5cmWKTjvYwPGxhjQOqfuoYZWBy7H2eZkYj6b2 8MSZ6LXbn5upd0WVj8lLZX2gvvS6QGaKWU9cL49QnPqW/KsMhFx2guxOTvLpC/AKBk59 I6nr09O9vyjklvImcmGiNfWRuY/aj/pVvEqvEjxcK7LLaPubzhYeJ9INlCf/wj0NAJsW Ed3F/u4FYnVz/ptFwy4aVliVzy4Zp9SuBG1/u3Sa2NQf1XA1Zk5MetG9NW4NgX/VFu38 8OUsGZIt9OKoYiwT5i1zkiLLvpnKrLVGcGHpG5xLwwKISvbzKvWrG9i+OZTeyAUj8J78 AjNQ== X-Gm-Message-State: ALoCoQnjpHq7pFBh2mxgV7C4AHUnW2LE3/T/vD/6JgLHD5UioXJloR1aFBBb2qhyhr5QrvliCgLa X-Received: by 10.60.155.135 with SMTP id vw7mr15430967oeb.62.1427443594511; Fri, 27 Mar 2015 01:06:34 -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.34 (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 27 Mar 2015 01:06:34 -0700 (PDT) From: "Nicholas A. Bellinger" To: target-devel Cc: linux-scsi , Hannes Reinecke , Christoph Hellwig , Sagi Grimberg , Nicholas Bellinger Subject: [RFC 22/22] target: Rename se_port/se_device export to target_* prefix Date: Fri, 27 Mar 2015 08:05:12 +0000 Message-Id: <1427443512-8925-23-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_alloc_port - target_export_port - target_release_port - target_dev_export - target_dev_unexport Signed-off-by: Nicholas Bellinger --- drivers/target/target_core_device.c | 16 ++++++++-------- drivers/target/target_core_internal.h | 4 ++-- drivers/target/target_core_tpg.c | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/target/target_core_device.c b/drivers/target/target_core_device.c index 5b225d8..efbc840 100644 --- a/drivers/target/target_core_device.c +++ b/drivers/target/target_core_device.c @@ -486,7 +486,7 @@ void target_clear_lun_from_tpg(struct se_lun *lun, struct se_portal_group *tpg) mutex_unlock(&tpg->acl_node_mutex); } -static struct se_port *core_alloc_port(struct se_device *dev) +static struct se_port *target_alloc_port(struct se_device *dev) { struct se_port *port, *port_tmp; @@ -538,7 +538,7 @@ again: return port; } -static void core_export_port( +static void target_export_port( struct se_device *dev, struct se_portal_group *tpg, struct se_port *port, @@ -580,7 +580,7 @@ static void core_export_port( /* * Called with struct se_device->se_port_lock spinlock held. */ -static void core_release_port(struct se_device *dev, struct se_port *port) +static void target_release_port(struct se_device *dev, struct se_port *port) __releases(&dev->se_port_lock) __acquires(&dev->se_port_lock) { /* @@ -599,7 +599,7 @@ static void core_release_port(struct se_device *dev, struct se_port *port) kfree(port); } -int core_dev_export( +int target_dev_export( struct se_device *dev, struct se_portal_group *tpg, struct se_lun *lun) @@ -607,7 +607,7 @@ int core_dev_export( struct se_hba *hba = dev->se_hba; struct se_port *port; - port = core_alloc_port(dev); + port = target_alloc_port(dev); if (IS_ERR(port)) return PTR_ERR(port); @@ -617,11 +617,11 @@ int core_dev_export( dev->export_count++; spin_unlock(&hba->device_lock); - core_export_port(dev, tpg, port, lun); + target_export_port(dev, tpg, port, lun); return 0; } -void core_dev_unexport( +void target_dev_unexport( struct se_device *dev, struct se_portal_group *tpg, struct se_lun *lun) @@ -637,7 +637,7 @@ void core_dev_unexport( spin_unlock(&lun->lun_sep_lock); spin_lock(&dev->se_port_lock); - core_release_port(dev, port); + target_release_port(dev, port); spin_unlock(&dev->se_port_lock); spin_lock(&hba->device_lock); diff --git a/drivers/target/target_core_internal.h b/drivers/target/target_core_internal.h index 6c8b7fb..240e5ba 100644 --- a/drivers/target/target_core_internal.h +++ b/drivers/target/target_core_internal.h @@ -14,9 +14,9 @@ int target_enable_device_list_for_node(struct se_lun *, struct se_lun_acl *, 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 *, +int target_dev_export(struct se_device *, struct se_portal_group *, struct se_lun *); -void core_dev_unexport(struct se_device *, struct se_portal_group *, +void target_dev_unexport(struct se_device *, struct se_portal_group *, struct se_lun *); struct se_lun *core_dev_add_lun(struct se_portal_group *, struct se_device *, u32); void core_dev_del_lun(struct se_portal_group *, struct se_lun *); diff --git a/drivers/target/target_core_tpg.c b/drivers/target/target_core_tpg.c index b10071d..ee6af20 100644 --- a/drivers/target/target_core_tpg.c +++ b/drivers/target/target_core_tpg.c @@ -795,7 +795,7 @@ int target_add_lun( if (ret < 0) return ret; - ret = core_dev_export(dev, tpg, lun); + ret = target_dev_export(dev, tpg, lun); if (ret < 0) { percpu_ref_exit(&lun->lun_ref); return ret; @@ -816,7 +816,7 @@ void target_remove_lun( target_clear_lun_from_tpg(lun, tpg); transport_clear_lun_ref(lun); - core_dev_unexport(lun->lun_se_dev, tpg, lun); + target_dev_unexport(lun->lun_se_dev, tpg, lun); mutex_lock(&tpg->tpg_lun_mutex); lun->lun_status = TRANSPORT_LUN_STATUS_FREE;