From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753963AbdDEIE0 (ORCPT ); Wed, 5 Apr 2017 04:04:26 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:51361 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752260AbdDEIEZ (ORCPT ); Wed, 5 Apr 2017 04:04:25 -0400 Subject: Re: dm: move dm_table_destroy() to same header as dm_table_create() To: Brian Norris , Mike Snitzer References: <20170328183102.80620-1-briannorris@chromium.org> <20170328193150.GA21445@redhat.com> <20170404223552.GA121849@google.com> Cc: Alasdair Kergon , dm-devel@redhat.com, linux-kernel@vger.kernel.org From: Enric Balletbo i Serra Message-ID: Date: Wed, 5 Apr 2017 10:04:20 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170404223552.GA121849@google.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 05/04/17 00:35, Brian Norris wrote: > On Tue, Mar 28, 2017 at 03:31:51PM -0400, Mike Snitzer wrote: >> On Tue, Mar 28 2017 at 2:31pm -0400, >> Brian Norris wrote: >> >>> If anyone is going to use dm_table_create(), they probably should be >>> able to use dm_table_destroy() too. Move the dm_table_destroy() >>> definition outside the private header, near dm_table_create() >>> >>> Signed-off-by: Brian Norris >> >> Not seeing why we need dm_table_create() exposed. So I think you went >> the wrong way with this. Unless you have an actual need, I'd prefer to >> see dm_table_create() moved from include/linux/device-mapper.h to >> drivers/md/dm.h > > We've been carrying code in our ChromeOS kernel to parse a cmdline arg > for setting up early DM maps -- e.g., a dm-verity rootfs without using > an initramfs. We currently use dm_table_create() from init/*.c (and we > *should* be using dm_table_destroy() in the error paths). So I'm > certainly not going to send the patch to do the reverse :) > > Enric is working on cleaning up this work to send here, so if you don't > want to see this patch now, you may well see it later. > As Brian told you we have a use case that uses the dm_table_create and others from init/*.c, I expect have a first patches during this week, if it's ok I'll include this patch in my patchset so you have the overall of what we are talking about. Cheers, Enric > Brian >