Re: Device Mapper Query

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Satyajeet,

On Fri, Jul 20, 2012 at 7:52 PM, Satyajeet <satya.unplugged@xxxxxxxxx> 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@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux