Message ID | 20170523234854.21452-11-bart.vanassche@sandisk.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <target-devel-owner@kernel.org> 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 0D9906037F for <patchwork-target-devel@patchwork.kernel.org>; Tue, 23 May 2017 23:49:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F32C028818 for <patchwork-target-devel@patchwork.kernel.org>; Tue, 23 May 2017 23:49:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E6A7B2885B; Tue, 23 May 2017 23:49:23 +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 72A6228818 for <patchwork-target-devel@patchwork.kernel.org>; Tue, 23 May 2017 23:49:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967385AbdEWXtW (ORCPT <rfc822;patchwork-target-devel@patchwork.kernel.org>); Tue, 23 May 2017 19:49:22 -0400 Received: from esa4.hgst.iphmx.com ([216.71.154.42]:48616 "EHLO esa4.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1765506AbdEWXtH (ORCPT <rfc822;target-devel@vger.kernel.org>); Tue, 23 May 2017 19:49:07 -0400 X-IronPort-AV: E=Sophos;i="5.38,383,1491235200"; d="scan'208";a="21096343" Received: from mail-cys01nam02lp0052.outbound.protection.outlook.com (HELO NAM02-CY1-obe.outbound.protection.outlook.com) ([207.46.163.52]) by ob1.hgst.iphmx.com with ESMTP; 24 May 2017 07:49:05 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sharedspace.onmicrosoft.com; s=selector1-sharedspace-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=vnn2xaOdpbe5UU2v2KObQEdO2pelfrUgFuMosjVdJC4=; b=KubP40kzUM2M75BWWLjmARmF3ZoJXwu79DY8QyOzoA18vR2MoakuvdpO0aIEiS+e8rHzrRCV+I6S4Zg8/os5isRxeagq9mQgcJC/rvq6CaP1auNetICYYNhoOxi8IFLjKUdMOBL0gTfSRI89UfMdYEG4kli7Q0IJkYc3Abkv2rA= Received: from CY4PR04CA0038.namprd04.prod.outlook.com (10.172.133.24) by DM5PR04MB0365.namprd04.prod.outlook.com (10.173.169.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1124.9; Tue, 23 May 2017 23:49:04 +0000 Received: from BN3NAM04FT029.eop-NAM04.prod.protection.outlook.com (2a01:111:f400:7e4e::205) by CY4PR04CA0038.outlook.office365.com (2603:10b6:903:c6::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1101.14 via Frontend Transport; Tue, 23 May 2017 23:49:03 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.225) smtp.mailfrom=sandisk.com; linux-iscsi.org; dkim=none (message not signed) header.d=none;linux-iscsi.org; dmarc=bestguesspass action=none header.from=sandisk.com; Received-SPF: Pass (protection.outlook.com: domain of sandisk.com designates 63.163.107.225 as permitted sender) receiver=protection.outlook.com; client-ip=63.163.107.225; helo=milsmgep14.sandisk.com; Received: from milsmgep14.sandisk.com (63.163.107.225) by BN3NAM04FT029.mail.protection.outlook.com (10.152.92.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.1075.5 via Frontend Transport; Tue, 23 May 2017 23:49:02 +0000 Received: from MILHUBIP03.sdcorp.global.sandisk.com (Unknown_Domain [10.201.67.162]) (using TLS with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by (Symantec Messaging Gateway) with SMTP id 9B.64.19026.D6AC4295; Tue, 23 May 2017 16:49:01 -0700 (PDT) Received: from milsmgip12.sandisk.com (10.177.8.100) by MILHUBIP03.sdcorp.global.sandisk.com (10.177.9.96) with Microsoft SMTP Server id 14.3.319.2; Tue, 23 May 2017 16:48:58 -0700 X-AuditID: 0ac94371-41ba798000004a52-03-5924ca6d7d84 Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.9.6]) by (Symantec Messaging Gateway) with SMTP id EA.F2.18148.A6AC4295; Tue, 23 May 2017 16:48:58 -0700 (PDT) From: Bart Van Assche <bart.vanassche@sandisk.com> To: Nicholas Bellinger <nab@linux-iscsi.org> CC: <target-devel@vger.kernel.org>, Bart Van Assche <bart.vanassche@sandisk.com>, Hannes Reinecke <hare@suse.com>, "Christoph Hellwig" <hch@lst.de>, David Disseldorp <ddiss@suse.de> Subject: [PATCH 10/33] target: Introduce target_get_device() and target_put_device() Date: Tue, 23 May 2017 16:48:31 -0700 Message-ID: <20170523234854.21452-11-bart.vanassche@sandisk.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170523234854.21452-1-bart.vanassche@sandisk.com> References: <20170523234854.21452-1-bart.vanassche@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrDLMWRmVeSWpSXmKPExsXCddJ5kW7uKZVIg4abmhZf/09nsVjwZi+b xcrVR5ks2lafYbRoXfqWyYHV4/72I0weu282sHms33KVxWPz6WqPz5vkAlijuGxSUnMyy1KL 9O0SuDJOHP/KXnCFt+JWj0cD41fuLkYODgkBE4nVT3W7GLk4hASWMkksO3KVCcLZwSjxrncD excjJ1jR/GO3wWwhgY2MEuc/y4PYbAJGE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3H4xsd1SeGhslfms/Ny1h6veb7yWeMFQtcSpz4U7Yd3uzf88DkU/ret+OkNZWjlnzWKj E19qdxecVGIpzkg01GIuKk4EAETDY4TBAQAA MIME-Version: 1.0 Content-Type: text/plain X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:63.163.107.225; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10019020)(979002)(6009001)(39400400002)(39450400003)(39410400002)(39860400002)(39850400002)(39840400002)(2980300002)(438002)(199003)(189002)(9170700003)(54906002)(2906002)(189998001)(575784001)(86362001)(478600001)(5660300001)(50466002)(72206003)(50226002)(106466001)(48376002)(305945005)(36756003)(33646002)(5003940100001)(1076002)(50986999)(76176999)(110136004)(53936002)(47776003)(38730400002)(4326008)(6666003)(2950100002)(6916009)(8676002)(81166006)(356003)(8936002)(77096006)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1102; SCL:1; SRVR:DM5PR04MB0365; H:milsmgep14.sandisk.com; FPR:; SPF:Pass; MLV:ovrnspm; A:1; MX:1; PTR:InfoDomainNonexistent; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN3NAM04FT029; 1:ZHCoUbbm8wUuAj4eCfwUeaO3+qe7HGAh26la9VsAUaywiyWDI7SU3+U+YSjltXtWADzaSt3cdg0pr2jIU1ikBo/jIJqcub2gogIcGPYYpS83RiRSBRzeHEfRoumrHZ9B3sqvhZxC9fz3l26aiCuBUKVwJLxqQ++e7hEDhv7ZBFq0FCbXkpPOIZETxFbZT09dQA/4yR8RrcFq0mVs7qkbJ9kAR7TzPlSBUohgRMHbW2Ql9+FiN9jJQgXyM0RzgQFE8qbotAg+K28iS8AVf+iRuZQr1wAZxZBQI6OeIzAjtDG+fFp8lW9KoFNRcgR1jWYIPrPytgMpSuyJdXxpyjePT1yX1d5/3tkVbeDiaafHjxyI0RtW4+umf4v0q165wY/qu9+L//PkCSpgCwGPuWb/rvfd5TVZJ4eIBWT4yOmPW+kx6D136PrmrobgmPM3YFfZbW3NH8++t+l5+AjB9qD0VBZowrRWc/1Gh+lfPg4EbvBR+AHtOfBiCCymCherfEXk X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM5PR04MB0365: X-MS-Office365-Filtering-Correlation-Id: 1e4a06f0-409e-47a3-c9de-08d4a2364aaa X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002)(2017030254075)(201703131423075)(201703031133081)(201702281549075); SRVR:DM5PR04MB0365; X-Microsoft-Exchange-Diagnostics: 1; DM5PR04MB0365; 3:U7RftCTt4B2QWdh27GFxRu9dG7mM9PdfXT7OFW3IQvIm18N7jYIeAQ71gCAAdbiRr0c/lh6lhxAZ/wyzM4Kd2iw7vIVHquuzts9FNpR84YogWTkAS9119B9dSaaiXGTxaNkke4oWXlfGPyYODlo3C4wI8NUX/BTgYa9GozJLR6WyEvUnJoYKg/Y1Fw+COGADte8GsVPCTk3wQ1eQybNO2LihW9B8ONOhvDcKybnXoPz6PLaZ35xEdsj08FdclIFVc39jbiHWB1ScJSR7bcUnLRXv/0u4eSKn5I4LeuqkzLzPdyTNM+39cATuVU65La/0rhYG1RLF4OquKUkhwCKTRzSjDaPh8InV3ugvtCPUgwELNEYsTkDA2fVVuI3duANvb5XLzTsJA9p57sPIWTMWKfst16a4frqwM7f8ehfcQjwZW4B2WEqUChze2R9PQFltKrdp1sQTmzqqUvRa5UWrkr/Wva/ri8JlEmRlDZgxb6NXaO+bzONnIKuNl5IiT8/f4SRTyqJqjDd91bo9uf+UvA== X-Microsoft-Exchange-Diagnostics: 1; DM5PR04MB0365; 25:pkbGp7dh9R0uDAzv3zTc4Z/bpN3hZYFz/i8O7c51deAzMcg5tHuLULcF+iA0FOQ4fEHVhNlMyYPc6l3qH9Glvi3KgC06sRFbqA/7ElEvMZ8SvF8GcoyouDJ2N+ebLSXPRWKIP3c0xYgYN7xhpKnM+9zBF5KIq1ngR8xp1t0U0NuXoe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ZVbOL4FusArnSULWn4Q7NWi5A1IdtWrs19oUo3bT+Ntg8h9htOFVFmXQFP5qvMspViVR74t4S0gqY X-Microsoft-Antispam-PRVS: <DM5PR04MB0365F6578091B65CF64FB8C481F90@DM5PR04MB0365.namprd04.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(42932892334569); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(13018025)(13016025)(5005006)(8121501046)(10201501046)(3002001)(93006095)(93004095)(6055026)(6041248)(20161123564025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123560025)(20161123562025)(6072148); SRVR:DM5PR04MB0365; BCL:0; PCL:0; RULEID:; SRVR:DM5PR04MB0365; X-Microsoft-Exchange-Diagnostics: 1; DM5PR04MB0365; 4:JsOEgfKenWwskInqdeX1S4d+xMPLSgTmv0GXC9SO0DLoL8THqpGSoyRL6EKu1aMxQtTPKC36rv0S7xFy1TlNQ199LKkAx3HBAx/PE/7bSvhJYGSzkw0npp06SqT/ta4L51aXHDo8LyErLRUmMrvllU9ce/TQYZjeVAXCZNdN9KbgqA19nc4P7518yTzHfV8T/aflNOym+5CSWrnvB8AqGDSSSBEnz4b3w9DDo4n0SsI+irQq/gB+CeYzhHVTo1VKlxDIAI/kYPASZpnasHQUrjhuyHPf2mdKqDZT3dRzY8k5HN53HuEFW0lnjoZ77Fz1ptvlEoYoxnuxWVb9E/WqO2r/UgoP80cOGu7IJAL0ejTcQo51MTu6tB2UpKst8yxGpG1XluOBqKCcENDV8x3/xYfQ/49NNskkpBCEdvfwgQSDxEO/hovgy6SatFsUViLhPUNzYNCc8bdOXSyQyMyohx+pbdqhEWMlEIUe1rQiZGB9KOrpfTdRhX5giq0wiTmt6HIbhOi3OCqgmdhHaD7Def8PFkyNBUD2i/RlTMaREBN8zJNLDCK2hJ4GD0WcuwEbNgh7mhdqm5SQt4akrPY3K0knmfmo813AnA9TG9/HTnCtIPJ2SYTHakpzVgZ3XAKk4VvQXymGChUG2KNg659MG7V49nPOoICL2KqbxYWlrLH0Mdisxsoo/uT3eAZfZ/aWGN5mMjFgCpJPj+92HClzHcvoscgC2VxuaMN7at1D2LWX3k3mBa+gUCEB9D/G1Y4RcqGW4hAif7fVxa7S6jspmNA6yzcZtv+WBAZ0kQ6/wv17+5vvaGsNKCwyOA5grD0gzHodUroQk5mttWao4siARg5Yf808ncNLJpk6wtq3SaT9EauwQWf/3Q2zoC+y9AEN X-Forefront-PRVS: 0316567485 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM5PR04MB0365; 23:QYTqzQjrJ2OXKsmrGWBDLKSso2utlQ4vZ0gqoqLUI?= =?us-ascii?Q?JCxwA0waWn2wkszvezPNaLdGsTeoQ83TaeQo/5LtgIXGFUxZ+GO5mVxectfN?= =?us-ascii?Q?LlsUmAea0KZ0Ve5EyCm2OPmJHMvRpxsutgcBoBCgwnpzlDG+XrEO3IRyTNkK?= =?us-ascii?Q?ja9Fzml8jiRFMldtc34ybLl90HCCj5W14oqsHMOoRJhQ3Uopvhw7BssN/BF6?= =?us-ascii?Q?arFCGffW5Lb0t/Rmm/vgbD0aNpPfJ/67/UXru40erTSD42zNkjvF15Kiy5n1?= =?us-ascii?Q?BzAHnklu+YquFuAk0dD8mtW31/+yK9LLAPdSt/GODZLB6sX3krgyCIxuz2aY?= =?us-ascii?Q?kg0gVmIlRkHN3Z895HAiXsd5WgaJfEdte76H8fBwaUZQBvm3D5uwjLat8ORg?= =?us-ascii?Q?Um4XArg0ZYVFg7Op9EqJDyf5lH1w1B3r0ExKWPYiy75cKgtr9UvyZmnjT7XW?= =?us-ascii?Q?XZAiJpcqfckroYdA0Rtfhq1fXtOzQOhQQCWUNm3JedufSD/B9FGBB7BCoWpt?= =?us-ascii?Q?/Fc2nT+8JNii0p/5b1HLrC+sS4uOObT31Ahxz9vvwYLgOoU8J8ZzP1kwG5+X?= =?us-ascii?Q?ABoIdR88S58K8lhqEYtpw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7lNy+UX79aX1/1kv6f053A9ho6mtUiusbQKt7ibg10+LVk9kdizx9JkANryjpGc= X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 May 2017 23:49:02.5722 (UTC) X-MS-Exchange-CrossTenant-Id: b61c8803-16f3-4c35-9b17-6f65f441df86 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=b61c8803-16f3-4c35-9b17-6f65f441df86; Ip=[63.163.107.225]; Helo=[milsmgep14.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR04MB0365 Sender: target-devel-owner@vger.kernel.org Precedence: bulk List-ID: <target-devel.vger.kernel.org> X-Mailing-List: target-devel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
On 05/23/2017 06:48 PM, Bart Van Assche wrote: > These new functions will be used by the next patch in this series. > > Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> > Cc: Hannes Reinecke <hare@suse.com> > Cc: Christoph Hellwig <hch@lst.de> > Cc: David Disseldorp <ddiss@suse.de> > Looks ok and test by me. Reviewed-by: Mike Christie <mchristi@redhat.com> -- To unsubscribe from this list: send the line "unsubscribe target-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/target/target_core_device.c b/drivers/target/target_core_device.c index aa6ccf521e33..48f84b1c83d2 100644 --- a/drivers/target/target_core_device.c +++ b/drivers/target/target_core_device.c @@ -960,6 +960,18 @@ int target_configure_device(struct se_device *dev) return ret; } +int target_get_device(struct se_device *dev) +{ + return config_item_get_unless_zero(&dev->dev_group.cg_item) != NULL; +} +EXPORT_SYMBOL(target_get_device); + +void target_put_device(struct se_device *dev) +{ + config_item_put(&dev->dev_group.cg_item); +} +EXPORT_SYMBOL(target_put_device); + void target_free_device(struct se_device *dev) { struct se_hba *hba = dev->se_hba; diff --git a/drivers/target/target_core_internal.h b/drivers/target/target_core_internal.h index 9ab7090f7c83..cf32df0e65ba 100644 --- a/drivers/target/target_core_internal.h +++ b/drivers/target/target_core_internal.h @@ -86,6 +86,8 @@ int core_dev_setup_virtual_lun0(void); void core_dev_release_virtual_lun0(void); struct se_device *target_alloc_device(struct se_hba *hba, const char *name); int target_configure_device(struct se_device *dev); +int target_get_device(struct se_device *dev); +void target_put_device(struct se_device *dev); void target_free_device(struct se_device *); /* target_core_configfs.c */
These new functions will be used by the next patch in this series. Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> Cc: Hannes Reinecke <hare@suse.com> Cc: Christoph Hellwig <hch@lst.de> Cc: David Disseldorp <ddiss@suse.de> --- drivers/target/target_core_device.c | 12 ++++++++++++ drivers/target/target_core_internal.h | 2 ++ 2 files changed, 14 insertions(+)