From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932580AbdC1TcC (ORCPT ); Tue, 28 Mar 2017 15:32:02 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58742 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932559AbdC1TcA (ORCPT ); Tue, 28 Mar 2017 15:32:00 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com F1BEE80476 Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=msnitzer@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com F1BEE80476 Date: Tue, 28 Mar 2017 15:31:51 -0400 From: Mike Snitzer To: Brian Norris Cc: Alasdair Kergon , dm-devel@redhat.com, linux-kernel@vger.kernel.org Subject: Re: dm: move dm_table_destroy() to same header as dm_table_create() Message-ID: <20170328193150.GA21445@redhat.com> References: <20170328183102.80620-1-briannorris@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170328183102.80620-1-briannorris@chromium.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Tue, 28 Mar 2017 19:31:54 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Mike > --- > drivers/md/dm.h | 1 - > include/linux/device-mapper.h | 5 +++++ > 2 files changed, 5 insertions(+), 1 deletion(-) > > diff --git a/drivers/md/dm.h b/drivers/md/dm.h > index f298b01f7ab3..c54d2f1934ce 100644 > --- a/drivers/md/dm.h > +++ b/drivers/md/dm.h > @@ -48,7 +48,6 @@ struct dm_md_mempools; > /*----------------------------------------------------------------- > * Internal table functions. > *---------------------------------------------------------------*/ > -void dm_table_destroy(struct dm_table *t); > void dm_table_event_callback(struct dm_table *t, > void (*fn)(void *), void *context); > struct dm_target *dm_table_get_target(struct dm_table *t, unsigned int index); > diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h > index a7e6903866fd..70cb6af56f67 100644 > --- a/include/linux/device-mapper.h > +++ b/include/linux/device-mapper.h > @@ -472,6 +472,11 @@ void dm_table_set_type(struct dm_table *t, unsigned type); > int dm_table_complete(struct dm_table *t); > > /* > + * Destroy the table when finished. > + */ > +void dm_table_destroy(struct dm_table *t); > + > +/* > * Target may require that it is never sent I/O larger than len. > */ > int __must_check dm_set_target_max_io_len(struct dm_target *ti, sector_t len); > -- > 2.12.2.564.g063fe858b8-goog >