All of lore.kernel.org
 help / color / mirror / Atom feed
* if i create a new dm target type, do i need to add its init to the _inits[] and its exit to the _exits[]?
@ 2014-05-07  4:45 John Utz
  2014-05-07 13:09 ` Mike Snitzer
  0 siblings, 1 reply; 3+ messages in thread
From: John Utz @ 2014-05-07  4:45 UTC (permalink / raw)
  To: dm-devel@redhat.com

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.

tnx!

johnu

^ permalink raw reply	[flat|nested] 3+ messages in thread

* 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[]?
  2014-05-07  4:45 if i create a new dm target type, do i need to add its init to the _inits[] and its exit to the _exits[]? John Utz
@ 2014-05-07 13:09 ` Mike Snitzer
  2014-05-07 16:00   ` John Utz
  0 siblings, 1 reply; 3+ messages in thread
From: Mike Snitzer @ 2014-05-07 13:09 UTC (permalink / raw)
  To: John Utz; +Cc: dm-devel@redhat.com

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* 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[]?
  2014-05-07 13:09 ` Mike Snitzer
@ 2014-05-07 16:00   ` John Utz
  0 siblings, 0 replies; 3+ messages in thread
From: John Utz @ 2014-05-07 16:00 UTC (permalink / raw)
  To: Mike Snitzer; +Cc: dm-devel@redhat.com

Ah. Makes sense.
tnx!
johnu
________________________________________
From: Mike Snitzer [snitzer@redhat.com]
Sent: Wednesday, May 07, 2014 6:09 AM
To: John Utz
Cc: dm-devel@redhat.com
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[]?

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-05-07 16:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-07  4:45 if i create a new dm target type, do i need to add its init to the _inits[] and its exit to the _exits[]? John Utz
2014-05-07 13:09 ` Mike Snitzer
2014-05-07 16:00   ` John Utz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.