tag:blogger.com,1999:blog-55008651956913258062024-02-08T05:25:48.808-08:00NetBSD bloghaadhttp://www.blogger.com/profile/15911459227537554907noreply@blogger.comBlogger5125tag:blogger.com,1999:blog-5500865195691325806.post-87423830970765274422008-06-10T04:34:00.000-07:002008-06-10T05:25:43.931-07:00device-mapper and libdevmapper ioctl interfaceSorry for the silence I was busy with my GSOC project, but I have really great news for you today. <div><br /></div><div>I have switched both NetBSD device-mapper and libdevmapper to new ioctl interface which uses property lists library to send/receive information. Main motivation was </div><div>that old ioctl interface is really messy and hard to maintain, extend and I have had to include GPL licensed file into my driver {dm-ioct.h} and because of it there can be some licensing issues.</div><div><br /></div><div>New proplib interface is defined in netbsd/netbsd-dm.h file. I have added compat file which translates new proplib dictionary into struct dm_ioctl which is used in all libdevmapper this file is called libdm_netbsd.c .</div><div><br /></div><div>I have uploaded my code to www.netbsd.org/~haad/dm20080610.tar.bz2 so everybody can review it.</div>haadhttp://www.blogger.com/profile/15911459227537554907noreply@blogger.com0tag:blogger.com,1999:blog-5500865195691325806.post-59061865890218965422008-05-26T14:26:00.000-07:002008-05-26T14:47:28.678-07:00LVM2tools and libdevmapper updateAfter two of my university exams I spent this weekend with porting lvm2tools and libdevmapper to NetBSD. If you ask "Why you said that they already work before", <div>I have to say that they worked with to many hacks and workarounds such as:</div><div><br /></div><div>dependency on mounted procfs with -o linux option.</div><div><br /></div><div>I have rewritten some lvm2tools/lib/filter/filter.c file to use NetBSD sysctl kern.drivers </div><div>knob instead of linux /proc/devices file. I have to say that get data with sysctl is much more easier than parsing text files from procfs .</div><div><br /></div><div>With all these changes in lvm2tools I can now use pv* and vg* commands to manipulate volume groups, physical volumes. There are some issues with lv* </div><div>commands. Problem is located somewhere in libdevmapper I have to </div><div>investigate this further.</div><div><br /></div><div>In my local branch I have also propagated changes in versiom 2.02.34-cvs (2008-01-31) of lvm2tools to my org.netbsd.haad.dm.lvm2 branch. I have to fix some conflicts </div><div>and I will push this update to public repo.</div><div><br /></div><div>In libdevmapper I have changed lib/ioctl/libdm_iface.c: get_proc_major to use sysctl again and not to use procfs. </div><div><br /></div><div>All changes can be seen here <span class="Apple-style-span" style=" white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-family:'Lucida Grande';font-size:14px;">http://147.175.97.81:8080/dm/.</span></div><div><br /></div>haadhttp://www.blogger.com/profile/15911459227537554907noreply@blogger.com0tag:blogger.com,1999:blog-5500865195691325806.post-70040904806472884312008-05-09T15:08:00.000-07:002008-05-09T15:38:54.587-07:00Device-mapper driverI want to explain in what state my driver is currently how to test etc.. <div><br /></div><div>Actually I have implemented 3 simple targets[1] inside NetBSD device-mapper. I can </div><div>create virtual block device based on linear target(in linux LVM it is Logical volume). </div><div>I can create file-system on it and mount it. </div><div><br /></div><div>For now I have to use this command to create file-system on my dm device</div><div><br /></div><div><code></div><div>newfs -F -s {size} /dev/mapper/{char device}</div><div></code></div><div><br /></div><div>DIOWEDGEINFO and DIOCGDINFO ioctls are not implemented now and therefore </div><div>newfs can find size of virtual block device. These ioctls are next on my task list.</div><div><br /></div><div>Other more sophisticated targets like stripe, mirror, snapshot are not implemented but with help of reinoud@ I have added support for them in to C structures. Structure layout can be found at [2].<br /></div><div><br /></div><div>Yesterday I have tried lvm2tools with my current driver and they mostly refuse work on NetBSD. I will look at this next I want to finish this before coding period for SOC project starts. Because in summer I will have no time to work on device-mapper backend I will be busy with rewriting of interface to functional state.</div><div><br /></div><div>[1]<span class="Apple-style-span" style="color: rgb(51, 51, 51); font-family: 'Trebuchet MS'; font-size: 16px; ">http://people.redhat.com/agk/talks/FOSDEM_2005/</span></div><div><span class="Apple-style-span" style="color: rgb(51, 51, 51); font-family: 'Trebuchet MS'; font-size: 16px;">[2]http://147.175.97.81:8080/dm/revision/file/8a70e9e68ab656befa48f3f58b08a6c65f9a2f9e/dm.h</span></div><div><span class="Apple-style-span" style="color: rgb(51, 51, 51); font-family: 'Trebuchet MS'; font-size: 16px;"><br /></span></div>haadhttp://www.blogger.com/profile/15911459227537554907noreply@blogger.com0tag:blogger.com,1999:blog-5500865195691325806.post-77278540385129351802008-05-08T13:19:00.000-07:002008-05-08T13:29:11.739-07:00Monotone VSC<div>Monotone is distributed VCS with many interesting features. I use it for my projects daily.</div><div><br /></div>Currently I use Monotone VCS to manage my projects. I have created monotone database where I keep my soc-project sources/history. This database is available at <div>mtn://147.175.97.81. If you don't have monotone installed but you want to see my </div><div>sources/history I have installed viewmtn for this purpose. viewmtn is available at </div><div>http://147.175.97.81:8080. </div><div><br /></div><div>Because I use Monotone to manage my sources and not CVS I had to find way how </div><div>to push sources from monotone directly to sf netbsd-soc CVS repository. Solution for </div><div>this is net.venge.monotone.cvssync branch in monotone repository. With monotone from this branch I can push, sync, takeover CVS repository. </div><div><br /></div>haadhttp://www.blogger.com/profile/15911459227537554907noreply@blogger.com0tag:blogger.com,1999:blog-5500865195691325806.post-73898925475909153722008-05-02T23:20:00.000-07:002008-05-02T23:21:41.695-07:00Welcome here!This is my first post on my blog. I will use this blog to show my progress on my SOC project.haadhttp://www.blogger.com/profile/15911459227537554907noreply@blogger.com0