Message ID | 20170125233646.2243-34-bart.vanassche@sandisk.com (mailing list archive) |
---|---|
State | Superseded |
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 84F8E6042C for <patchwork-target-devel@patchwork.kernel.org>; Wed, 25 Jan 2017 23:37:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7B3C527F17 for <patchwork-target-devel@patchwork.kernel.org>; Wed, 25 Jan 2017 23:37:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 702DE27FBB; Wed, 25 Jan 2017 23:37:20 +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 C196227F17 for <patchwork-target-devel@patchwork.kernel.org>; Wed, 25 Jan 2017 23:37:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750911AbdAYXhT (ORCPT <rfc822;patchwork-target-devel@patchwork.kernel.org>); Wed, 25 Jan 2017 18:37:19 -0500 Received: from mail-sn1nam01on0067.outbound.protection.outlook.com ([104.47.32.67]:2242 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750896AbdAYXhB (ORCPT <rfc822;target-devel@vger.kernel.org>); Wed, 25 Jan 2017 18:37:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sandiskcorp.onmicrosoft.com; s=selector1-sandisk-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=JoViW3jiFSXJjEWO5K/gTbDwRtEdQtfyHSS2xVU4us0=; b=rJoLXfwUVWI0YPPaRbILMPC7aE0/sUj7X0Qwx/P6F7HQp0uyLgtHNDiWsyTXZa9N9ATf4By5gAKxPHZn7WHeqjBnpGpnjLkiVgu3DE7GzNV0ewtI9zFUrHTmdX+Cp4VqQz1VmbnrjCjBijUwVVajMLboflrmt1b17+CKNELFDwE= Received: from CY4PR02CA0048.namprd02.prod.outlook.com (10.175.57.162) by BY2PR02MB1283.namprd02.prod.outlook.com (10.162.79.155) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.860.13; Wed, 25 Jan 2017 23:36:58 +0000 Received: from BN1AFFO11OLC003.protection.gbl (2a01:111:f400:7c10::168) by CY4PR02CA0048.outlook.office365.com (2603:10b6:903:117::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.874.12 via Frontend Transport; Wed, 25 Jan 2017 23:36:57 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.225) smtp.mailfrom=sandisk.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.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 BN1AFFO11OLC003.mail.protection.outlook.com (10.58.53.74) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.803.8 via Frontend Transport; Wed, 25 Jan 2017 23:36:57 +0000 Received: from MILHUBIP04.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 CA.A1.01420.E5439885; Wed, 25 Jan 2017 15:27:26 -0800 (PST) Received: from milsmgip11.sandisk.com (10.177.9.6) by MILHUBIP04.sdcorp.global.sandisk.com (10.177.9.97) with Microsoft SMTP Server id 14.3.319.2; Wed, 25 Jan 2017 15:36:50 -0800 X-AuditID: 0ac94371-7ee9b9800001058c-88-5889345ef77b Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.9.6]) by (Symantec Messaging Gateway) with SMTP id B1.45.16817.29639885; Wed, 25 Jan 2017 15:36:50 -0800 (PST) From: Bart Van Assche <bart.vanassche@sandisk.com> To: Bart Van Assche <bart.vanassche@sandisk.com> CC: <target-devel@vger.kernel.org>, Christoph Hellwig <hch@lst.de>, "David Disseldorp" <ddiss@suse.de> Subject: [PATCH 33/34] target: Introduce target_get_device() and target_put_device() Date: Wed, 25 Jan 2017 15:36:45 -0800 Message-ID: <20170125233646.2243-34-bart.vanassche@sandisk.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170125233646.2243-1-bart.vanassche@sandisk.com> References: <20170125233646.2243-1-bart.vanassche@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrNLMWRmVeSWpSXmKPExsXCddJ5kW6cSWeEwfLpShZf/09nsVi5+iiT RevSt0wOzB67bzaweWw+Xe3xeZNcAHMUl01Kak5mWWqRvl0CV8aZlRoF03gr2m5NZGtg3M/d xcjJISFgIrFvaQ9bFyMXh5DAUiaJ7YdPs0I42xglbuyawwxTdbz5MgtEYiOjxNIvrxlBEmwC RhLf3s9kAbFFBAwkfvdeAIszC6RJ3N/+kwnEFhYIkXj19h4biM0ioCrR93EjmM0rYC+xbtt+ qAXyErvaLrKC2JxA8dazP8FmCgnYSaw/0MoEslhC4BOLRO+sT+wQzYISJ2c+YYFYJiFx8MUL ZogGdYmTS+YzTWAUmoWkbBaSsgWMTKsYxXIzc4pz01MLDE30ihPzUjKLs/WS83M3MUKCuHAH 4+vb3ocYBTgYlXh4BbZ0RAixJpYVV+YeYpTgYFYS4V0n1xkhxJuSWFmVWpQfX1Sak1p8iFGa g0VJnPdi9McwIYH0xJLU7NTUgtQimCwTB6dUA+OWRLYte8Wu9f1J75ngkrBz9s86vf935i7j q6246C31+MzvSfyqUV+8D77PvjprOUdayaprnxcWB27af9b4bx57UsbhqRWJBu0qq9ck7b/M wcH9TdW0azZnlT9HfKrQSa9/Tnrxcr9y4qUs+QrWvzX7r1VyYXrTStW93ZsXfKjefOTvv0oX qzwlluKMREMt5qLiRADVjwmyXgIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprFJMWRmVeSWpSXmKPExsXCtZGTTXeSWWeEwYstXBYHf7YxWnz9P53F YuXqo0wWrUvfMjmweOy+2cDmMW3NeSaPzaerPT5vkgtgieKySUnNySxLLdK3S+DKOLNSo2Aa b0XbrYlsDYz7ubsYOTkkBEwkjjdfZuli5OIQEljPKHH77kQ2kASbgJHEt/czWUBsEQEDid+9 FxhBbGaBNImrH66xgtjCAiESr97eA6tnEVCV6Pu4EczmFbCXeLmpkRFigbzErraLYPWcQPHW sz/BZgoJ2EmsP9DKNIGRewEjwypGsdzMnOLc9MwCQ0O94sS8lMzibL3k/NxNjBDfR+5gfDrR /BAjEwenVAPjdNZ5eX8uerQcmnftvI2i5FW3s5ejnjJKLM9NZNvwOq/myIJ3KrX3T8S4rsn9 GR+Y6SarvjuK78Qmnv7gAocnCoyMZ+w5+ZjfZO1nXzex4ZEqY7rSs0yjzOmcz33m3mZ9m3y6 MXXZ1xgD1ahpzBwbBCOVvi71sJhSkJkRYvZ3q13XbJ/KhTZKLMUZiYZazEXFiQAMlBRtrQEA AA== 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:(10009020)(6009001)(7916002)(39850400002)(39410400002)(39860400002)(39450400003)(39840400002)(2980300002)(438002)(189002)(199003)(81156014)(68736007)(356003)(50466002)(48376002)(69596002)(81166006)(50226002)(1691005)(36756003)(305945005)(2270400002)(92566002)(7049001)(5660300001)(8936002)(33646002)(47776003)(626004)(8676002)(76176999)(110136003)(106466001)(53936002)(1076002)(6862003)(6666003)(2950100002)(86362001)(4326007)(54906002)(77096006)(5003940100001)(6200100001)(189998001)(97736004)(2906002)(50986999)(38730400001); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR02MB1283; H:milsmgep14.sandisk.com; FPR:; SPF:Pass; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11OLC003; 1:GIzQhTLmdhNhCwi/yWxbForL0DNoNK/zcZ0IgUlMtUUMyYCtCZEF5B0i3tThckuTApUzZ+2rNQSvndiql5ap/W5S6P/6xSWRQ32rllGdZr7KsbQhXCTPr3SSedJ20s8T32ZN6yXT8zcjxK3I/YOZJhenyITDjm8115AMpep1ttX2Aw21wkpC72vshfOT0D65CjsEsvy7gGwKApulYUtCOeZbfhaNDeELUAjv+iPGHIOT1TRRa0No7EAtnXLlWXb1WID5H2DZYQ0AlErBWirQo0v6/fnBziAOsDgz/+IYAZnnnV62JKIV27l8mfSsIrgPZrLEWZRbpKBtIBXboOhZuzubFtj+jODUJrijV7LovUgd8tXiG5wc0SUkMRz23TniIwYN9R0POEsoyty6YBPTh6ExVfMkcSqVcYI8On3QYpfHZW+SzP5OAzGdVPkn3PvaCL+P2wB5B3GqN1JTxdHh3PHSys1yq/QVys3hxvVEbflmP2Rt6hsMvjMftgefd07N X-MS-Office365-Filtering-Correlation-Id: fce5dc22-c49a-4a88-74bc-08d4457b0d88 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002); SRVR:BY2PR02MB1283; X-Microsoft-Exchange-Diagnostics: 1; BY2PR02MB1283; 3:jp6R4Vl6Z/Pb8dSEYy8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Au9B1RWp12GL8HwC0taF3cHqAwIE7hVA3blpKraQp7hxDozYYoWK86SfUmqysOuYLy0TjimNIvO4uuSQ7Ej/Ge851Xuc0v1oslxm9GJYJYfWk=; 20:LBmM3YmhObD3rK7dhHJlD2M+dElxBQrvNYGrzieGzQHleYy1fWv+ecfw38f2yscQ82+dM6fri2NhOooBOt/mCftqqdphOZ7+YUnRadLcpW6keEzLewiF8b2EVbRfH9Z59oMR2Oo3VwVUv7tzDJ9lApC5L3da8IVxew7UjP4VHwovnEtoSpB+MQ5g3s5r2lU9F785CyzlDxBbRhkb3ckh4bcXgoid3vBahpD2XN9PtBSJloXUydxRr/1BIz9MyGx/kKsvtuYEjirFtSJ3o8esEliYyE9diSuepQGPNMvGD3MgmICKO3v58EencGKpaI6jasm6+YJt2smKFHpVOX/n3aRB1XjC1wMduuBWfMfxVjyKWd1UloAF8uhemy63F6NMODM+etcFR4zpHaROK1G591HjXE2Bft2ZKWa6QY3+die9UDdtKfczKXLyJ0gNdYlwQb1dmrWswuSuTMqPwrjL+tQkM6t/VSsGsFpSCcG6P6eVPuV9pp1wHi7PVdOmRwTc X-Microsoft-Antispam-PRVS: <BY2PR02MB12830F2064B7332CEE12260381740@BY2PR02MB1283.namprd02.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(42932892334569); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(13018025)(13016025)(5005006)(8121501046)(3002001)(10201501046)(6055026)(6041248)(20161123560025)(20161123564025)(20161123555025)(20161123558021)(20161123562025)(6072148); SRVR:BY2PR02MB1283; BCL:0; PCL:0; RULEID:; SRVR:BY2PR02MB1283; X-Microsoft-Exchange-Diagnostics: 1; BY2PR02MB1283; 4:XfTrum98NVQUjC0x+LXiNeqzWkMNHP4d0QzEFEtU408CgD5FU3SM6NaDtVu5YZHycqLtpX9ZvEUbz8GYXyoxWXxROZ1iwnAMfVIpehvAT5/l6PrhfcDzzgrRd97vKCMYSFF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q?FErzzaJHrA0xxgVxxirHnDXy7z88Ni/u3bDLBo3fczriO7baC0vJ9tN4g=3D?= =?us-ascii?Q?=3D?= X-Microsoft-Exchange-Diagnostics: 1; BY2PR02MB1283; 6:XFLwk2XOkAK/qV/dht1ti44pkeZJOfsUFyAVU2DB0+9Y1tmdcGN14FPCtp5BdP7teTpKG4+ghp+MMtk5VyEJPhq/Evxz+TppPhbkcXqohs0EMFRm1iP14aoZGeBrpvA6vfcCnPcMVTnILD563z2NnUivP3VrHR3pxBZwmxNQVHGifC3zKjahzbrp8rseO5jiBk86yJ8uWBF7wQpy8iDGxtjYR+CMHepdXEax3JYnlNSyATTLgDoiigMSa1/5JjTEwkQq6raYJJSi/PlpVKfeDfE4XT1EdBJi7MudDE9EoWxt6wUQr0++gbFGSqrxIX/LWratQj0jPH1TJzfVXobaJRwslzoIeptVjFn8MT/XdlZ0ABs5s7nlE9znod7FAB1buFfMR/skBk22O2xw79xow6rfaQjG/WucBtv3vA8EHBx/JTDJjNxrh8pTELq45Ck6Zuw4FQYD8batSvtSaXA2qQ==; 5:zDHiZbtl9On5OcGX0lLyEUDYMGPEHYU9cw3mJBzeO2ZXKYdY8UQDOhbkS3davllgww/qvWoavpS36/ASD2WS+uAlb+WlEzPsMUiKAhNJzvowLihYI5MKqnRJrzrM4rNHuuUBZWu13hNbkCaaFZBZEA==; 24:ydyzjcVdUj9wfjRGtmDBg2bvWfD9tDt1DuWCH/vfMhP/sl2oPOVMAj5tjUt6kyQUWnYxQQeWiRJdDmR/gGh2tfE8FQzNCYtDyTSL1ob1PnY= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY2PR02MB1283; 7:QHLU1Soosr9rrLWMtuwEbLLR45uiAlTMMw3hewC83swI/Gwjyx6M1s9xFWD7UqMOKfQWIB4+wPKV9UZ6ZUPKtHpd8swH8LY/gx70+6Fm+agn5rtvF+fZaKUDGeOInzIMlXk2628Fx145bvW/alDAgifPNneQd8VMndH9TgWB/snT9MEZ6DmTaafvcVVTivlY9uJUI5RmBnqOF0S7CpOfphOB+eyb4KMW+6Gwx3VCtqZ+RJBSx+owCvN3+GmM8m7iVdJkmIj9wLYDwL+a6tDKGQfM3OjE+NtCUM+0Nw8dpWEd1AJiQ2iBy/vh/bZQ9TZLbub2ggpWNaJdBoIlkSGAVLlsVZXaVJEwxHKcXizouYZNzg6MfdznQ3ShIzwy0fb+zqKQlt5ISYuCcnWOEegQ4IW5+5p0i17Ba5OAlZLsxlZM699PbvgFL/blgHyfqbvwHsM2m/mSxwssOoR3Ctc5Wg== X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jan 2017 23:36:57.2835 (UTC) X-MS-Exchange-CrossTenant-Id: fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d; Ip=[63.163.107.225]; Helo=[milsmgep14.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR02MB1283 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 |
diff --git a/drivers/target/target_core_device.c b/drivers/target/target_core_device.c index 9d55e9fe7857..e45dd29c995a 100644 --- a/drivers/target/target_core_device.c +++ b/drivers/target/target_core_device.c @@ -947,6 +947,18 @@ int target_configure_device(struct se_device *dev) return ret; } +void target_get_device(struct se_device *dev) +{ + config_item_get(&dev->dev_group.cg_item); +} +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 6f6cae81ab8e..503bea508ee8 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); +void 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: 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(+)