All of lore.kernel.org
 help / color / mirror / Atom feed
* Device Mapper Query
@ 2012-07-20 14:22 Satyajeet
  2012-07-20 16:59 ` Gaurav Mahajan
  2012-07-20 20:01 ` Vineet Agarwal
  0 siblings, 2 replies; 3+ messages in thread
From: Satyajeet @ 2012-07-20 14:22 UTC (permalink / raw)
  To: kernelnewbies

Does the dmsetup <dm-dev> <table-file> command, calls the constructor* *
dm_ctr_fn??

If yes what are the argv passed in the dm_ctr_fn, are they the args you
pass to dmsetup??

Is this constructor a callback from dm layer? when it is invoked and how it
is invoked?

Replies will be appreciated.

Regards,
satyajeet
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120720/94d5ec9e/attachment.html 

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

* Device Mapper Query
  2012-07-20 14:22 Device Mapper Query Satyajeet
@ 2012-07-20 16:59 ` Gaurav Mahajan
  2012-07-20 20:01 ` Vineet Agarwal
  1 sibling, 0 replies; 3+ messages in thread
From: Gaurav Mahajan @ 2012-07-20 16:59 UTC (permalink / raw)
  To: kernelnewbies

Hi  Satyajeet,

On Fri, Jul 20, 2012 at 7:52 PM, Satyajeet <satya.unplugged@gmail.com>wrote:

> Does the dmsetup <dm-dev> <table-file> command, calls the constructor* *
> dm_ctr_fn??

Yes.

> If yes what are the argv passed in the dm_ctr_fn, are they the args you
> pass to dmsetup??
>
True

> Is this constructor a callback from dm layer? when it is invoked and how
> it is invoked?
>

Dm layer registers a fops when ever a new device mapper target is
registered.
So whenever a new device is created then dm refer the fops and call the
respective functions.

To start learning more you can start looking into linear target's code.

Regards,
Gaurav Mahajan.


> Replies will be appreciated.
>
> Regards,
> satyajeet
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120720/f3671a3f/attachment.html 

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

* Device Mapper Query
  2012-07-20 14:22 Device Mapper Query Satyajeet
  2012-07-20 16:59 ` Gaurav Mahajan
@ 2012-07-20 20:01 ` Vineet Agarwal
  1 sibling, 0 replies; 3+ messages in thread
From: Vineet Agarwal @ 2012-07-20 20:01 UTC (permalink / raw)
  To: kernelnewbies

Hello Satyajeet,

On Fri, Jul 20, 2012 at 7:52 PM, Satyajeet <satya.unplugged@gmail.com>wrote:

> Does the dmsetup <dm-dev> <table-file> command, calls the constructor* *
> dm_ctr_fn??


>
If yes what are the argv passed in the dm_ctr_fn, are they the args you
> pass to dmsetup??
>
> Is this constructor a callback from dm layer? when it is invoked and how
> it is invoked?
>
>
As i understand, dmsetup create calls DM_DEVICE_CREATE which fire two ioctls
1) DM_DEV_CREATE
2) DM_TABLE_LOAD

This first ioctl basically create the dev mapper device.
dev_create ()
|
 -> dm_create ()

The second ioctl basically first creates an empty dm_table and later
populate it. During the population it calls the target constructor.
table_load ()
| dm_table_create ()
| populate_table ()
 |
->dm_table_add_target ()
|
                        -> ctr ()

For further details i would suggest you refer to dm-ioctl.c, dm.c and
dm-table.c

Hope it helps.

-- 
Regards:
Vineet Agarwal


> Replies will be appreciated.
>
> Regards,
> satyajeet
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120721/d401ec38/attachment.html 

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

end of thread, other threads:[~2012-07-20 20:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-20 14:22 Device Mapper Query Satyajeet
2012-07-20 16:59 ` Gaurav Mahajan
2012-07-20 20:01 ` Vineet Agarwal

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.