FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Device-mapper Development

 
 
LinkBack Thread Tools
 
Old 05-03-2012, 09:12 PM
Mark-Willem Jansen
 
Default Changing from dm-raid45.ko to dm-raid.ko

Dear md/dm developers,

As I already pointed out on the ataraid-list, I have made a small patch for dmraid, so it will use the dm-raid target in state of the dm-raid45 target to handle raid4 and riad5 setups. This patch is added to this e-mail. To put it in context I use dmraid to detect my fakeraid, which is shared with a Windows OS.

There were some things I could not figure out and would like to ask three questions regarding the arguments passed to the module.

- First a more general question does it look okay to you what I have implemented?

- Second what to do with the offset variable that is given by the metadata on the disk? On the other dmraid related modules the disk information is passed like [dev][offset]. With the dm-raid module it changed to [meta-dev][data-dev]. In the patch I ignore the meta-dev and just pass "- path_to_dev" to the module. This will work as the offset given by the metadata on my disks are equal to zero, the same value that is automatically set by the module. What does one have to do if the metadata on the disk says that the offset is not equal to zero?

- Last I would like to build up the argument string more generally. Like concatenate the argument strings depending on some if statements, like

if(need_sync)
** num_arg += 2;
** arguments = arguments + sprintf("rebuild %d", rebuild_drive.data.i32);
fi

And then pass the final string using

p_fmt(lc, table, "0 %U %s %s %u %s", sectors, dm_type, raid_type, num_arg, arguments).

This will make the code easier to read and quicker to hack/change/code.

Thanks,

Mark-Willem Jansen
P.S.: The patch is a modified version of the one I send to the ataraid-list some weeks ago.

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 

Thread Tools




All times are GMT. The time now is 04:50 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org