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
** num_arg += 2;
** arguments = arguments + sprintf("rebuild %d", rebuild_drive.data.i32);
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.
P.S.: The patch is a modified version of the one I send to the ataraid-list some weeks ago.
dm-devel mailing list
|All times are GMT. The time now is 03:54 AM.|
VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.