From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Snitzer Subject: Re: if i create a new dm target type, do i need to add its init to the _inits[] and its exit to the _exits[]? Date: Wed, 7 May 2014 09:09:47 -0400 Message-ID: <20140507130946.GA29851@redhat.com> References: <8A51900D08212F40B3DE22453052F6981D0F0297@wdscexmb02> Reply-To: device-mapper development Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <8A51900D08212F40B3DE22453052F6981D0F0297@wdscexmb02> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com To: John Utz Cc: "dm-devel@redhat.com" List-Id: dm-devel.ids On Wed, May 07 2014 at 12:45am -0400, John Utz wrote: > Hello; > > While looking thru dm.c trying to figure out how to add new target > specific errors and sense codes I came across the following arrays: > > static int (*_inits[])(void) __initdata = { > local_init, > dm_target_init, > dm_linear_init, > dm_stripe_init, > dm_io_init, > dm_kcopyd_init, > dm_interface_init, > dm_statistics_init, > }; > > static void (*_exits[])(void) = { > local_exit, > dm_target_exit, > dm_linear_exit, > dm_stripe_exit, > dm_io_exit, > dm_kcopyd_exit, > dm_interface_exit, > dm_statistics_exit, > }; > > > What are the rules for what goes in to these? I don't see every dm-* > target listed in these and i am curious as to what are the differences > between what goes into these arrays and what does not. These are only for the targets and services provided by the DM core (dm-mod.ko went built as a module).