From patchwork Tue Oct 9 20:13:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= X-Patchwork-Id: 10633245 X-Patchwork-Delegate: snitzer@redhat.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5748413BB for ; Tue, 9 Oct 2018 20:14:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4D29E29486 for ; Tue, 9 Oct 2018 20:14:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4138B2948F; Tue, 9 Oct 2018 20:14:18 +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.9 required=2.0 tests=BAYES_00,DKIM_ADSP_ALL, DKIM_INVALID,DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E297929486 for ; Tue, 9 Oct 2018 20:14:17 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 983E0C0AF7B2; Tue, 9 Oct 2018 20:14:16 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4D988503E9; Tue, 9 Oct 2018 20:14:16 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 09B464BB79; Tue, 9 Oct 2018 20:14:16 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w99KDqR5031551 for ; Tue, 9 Oct 2018 16:13:52 -0400 Received: by smtp.corp.redhat.com (Postfix) id 3D69F111F3DD; Tue, 9 Oct 2018 20:13:52 +0000 (UTC) Delivered-To: dm-devel@redhat.com Received: from mx1.redhat.com (ext-mx02.extmail.prod.ext.rdu2.redhat.com [10.11.55.2]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 727CF111F3DA; Tue, 9 Oct 2018 20:13:48 +0000 (UTC) Received: from rere.qmqm.pl (rere.qmqm.pl [91.227.64.183]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6EBCC7D84D; Tue, 9 Oct 2018 20:13:46 +0000 (UTC) Received: from remote.user (localhost [127.0.0.1]) by rere.qmqm.pl (Postfix) with ESMTPSA id 42V7hB2pH9z1D; Tue, 9 Oct 2018 22:12:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rere.qmqm.pl; s=1; t=1539115978; bh=l8KqCYJnOFGh7i86DrCuDAq0W3q3tg8cfKPd422eSeE=; h=Date:From:Subject:In-Reply-To:References:To:Cc:From; b=FNFAPxCUGsICXjJkEhkDKVdlVQsKcqWVZ7HyYk1U0XWr8X4UX7cklGef+/kHpuomg xf3ZAc8QCFe2j5HZk9psQVzIxfmmvxc7KcswVnss+iF+S3uqUNNW45VEIaDjIFGJPi /Emu5r5gP4tLxtkLIRmQ3Ci+xq/DLOQObd4BxYVEENPWD8mktpIIl/cAe3gbUT42ci /Izy1HS4HhcSGSIHhxLcXqrEC+Xlue89yY2S6SxYuvhcoFqoo30jEzoU2Ke+fzGhbU hJRcksQqmKJtB33485rdnKsaJvx8bocXMY9VGhCa4vrgldSQUYwuaNMCVNnvM1MF/O txRk4AR+yBmDA== X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.100.1 at mail Date: Tue, 09 Oct 2018 22:13:42 +0200 Message-Id: <80a39e1a5beb7137b7112ae8b2302cb168bebdd3.1539115528.git.mirq-linux@rere.qmqm.pl> From: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= In-Reply-To: <20181009194250.GB4974@redhat.com> References: <20181009194250.GB4974@redhat.com> MIME-Version: 1.0 To: Alasdair Kergon , Mike Snitzer X-Greylist: Sender passed SPF test, ACL 236 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Tue, 09 Oct 2018 20:13:46 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Tue, 09 Oct 2018 20:13:46 +0000 (UTC) for IP:'91.227.64.183' DOMAIN:'rere.qmqm.pl' HELO:'rere.qmqm.pl' FROM:'mirq-linux@rere.qmqm.pl' RCPT:'' X-RedHat-Spam-Score: -0.102 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, SPF_HELO_PASS, SPF_PASS) 91.227.64.183 rere.qmqm.pl 91.227.64.183 rere.qmqm.pl X-Scanned-By: MIMEDefang 2.78 on 10.11.55.2 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-loop: dm-devel@redhat.com Cc: dm-devel@redhat.com Subject: [dm-devel] [PATCH v2 1/2] dm: add dm_table_device_name() X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Tue, 09 Oct 2018 20:14:17 +0000 (UTC) X-Virus-Scanned: ClamAV using ClamSMTP Add a shortcut for dm_device_name(dm_table_get_md(t)). Signed-off-by: Michał Mirosław --- v2: use EXPORT_SYMBOL_GPL like dm_device_name() --- drivers/md/dm-table.c | 6 ++++++ include/linux/device-mapper.h | 1 + 2 files changed, 7 insertions(+) diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c index 3d0e2c198f06..792de0a44cd8 100644 --- a/drivers/md/dm-table.c +++ b/drivers/md/dm-table.c @@ -2079,6 +2079,12 @@ struct mapped_device *dm_table_get_md(struct dm_table *t) } EXPORT_SYMBOL(dm_table_get_md); +const char *dm_table_device_name(struct dm_table *t) +{ + return dm_device_name(t->md); +} +EXPORT_SYMBOL_GPL(dm_table_device_name); + void dm_table_run_md_queue_async(struct dm_table *t) { struct mapped_device *md; diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h index 6fb0808e87c8..0d63f7e5261c 100644 --- a/include/linux/device-mapper.h +++ b/include/linux/device-mapper.h @@ -490,6 +490,7 @@ sector_t dm_table_get_size(struct dm_table *t); unsigned int dm_table_get_num_targets(struct dm_table *t); fmode_t dm_table_get_mode(struct dm_table *t); struct mapped_device *dm_table_get_md(struct dm_table *t); +const char *dm_table_device_name(struct dm_table *t); /* * Trigger an event.