Hello Satyajeet,<br><br><div class="gmail_quote">On Fri, Jul 20, 2012 at 7:52 PM, Satyajeet <span dir="ltr"><<a href="mailto:satya.unplugged@gmail.com" target="_blank">satya.unplugged@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Does the dmsetup <dm-dev> <table-file> command, calls the constructor<b> </b><span style="font-family:'Trebuchet MS','Lucida Grande',Verdana,Arial,sans-serif">dm_ctr_fn??</span></blockquote>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div> </div></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><span style="font-family:'Trebuchet MS','Lucida Grande',Verdana,Arial,sans-serif"></span></div><div><span style="font-family:'Trebuchet MS','Lucida Grande',Verdana,Arial,sans-serif">If yes what are the argv passed in the dm_ctr_fn, are they the args you pass to dmsetup??</span></div>
<div><span style="font-family:'Trebuchet MS','Lucida Grande',Verdana,Arial,sans-serif"><br></span></div><div><span style="font-family:'Trebuchet MS','Lucida Grande',Verdana,Arial,sans-serif">Is this constructor a callback from dm layer? when it is invoked and how it is invoked?</span></div>
<div><span style="font-family:'Trebuchet MS','Lucida Grande',Verdana,Arial,sans-serif"><br></span></div></blockquote><div><br></div><div><div>As i understand, dmsetup create call<font face="arial, helvetica, sans-serif"><span style="white-space:pre">s DM_DEVICE_CREATE which fire two ioctls</span></font></div>
<div>1) DM_DEV_CREATE</div><div>2) <span style="color:rgb(34,34,34);line-height:19px;text-align:justify">DM_TABLE_LOAD</span></div><div><span style="color:rgb(34,34,34);line-height:19px;text-align:justify"><br></span></div>
<div><span style="color:rgb(34,34,34);line-height:19px;text-align:justify">This first ioctl basically create the dev mapper device.</span></div><div><div>dev_create ()</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>|</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>-> dm_create ()</div></div><div><br></div><div><span style="color:rgb(34,34,34);line-height:19px;text-align:justify">The second ioctl basically first creates an empty dm_table and later populate it. During the population it calls the target constructor.</span></div>
</div><div><div>table_load ()</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>| dm_table_create ()</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>| populate_table ()</div><div>
<span class="Apple-tab-span" style="white-space:pre">                </span>|</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>->dm_table_add_target ()</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>|</div>
<div> -> ctr ()</div></div><div><br></div><div>For further details i would suggest you refer to dm-ioctl.c, dm.c and dm-table.c</div><div><br></div><div><div>Hope it helps.</div><div><br></div><div>
-- </div>Regards:<br>Vineet Agarwal<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><span style="font-family:'Trebuchet MS','Lucida Grande',Verdana,Arial,sans-serif"></span></div>
<div><span style="font-family:'Trebuchet MS','Lucida Grande',Verdana,Arial,sans-serif">Replies will be appreciated.</span></div>
<div><span style="font-family:'Trebuchet MS','Lucida Grande',Verdana,Arial,sans-serif"><br></span></div><div><span style="font-family:'Trebuchet MS','Lucida Grande',Verdana,Arial,sans-serif">Regards,<br>
satyajeet</span></div>
<br>_______________________________________________<br>
Kernelnewbies mailing list<br>
<a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
<a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br><br></blockquote></div>