[dm-devel] if i create a new dm target type, do i need to add its init to the _inits[] and its exit to the _exits[]?

Mike Snitzer snitzer at redhat.com
Wed May 7 13:09:47 UTC 2014


On Wed, May 07 2014 at 12:45am -0400,
John Utz <John.Utz at wdc.com> 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).




More information about the dm-devel mailing list