[PATCH] 3/4: Add multiple raid_dev per physical device support to DDF

Darrick J. Wong djwong at us.ibm.com
Fri Jun 2 00:21:27 UTC 2006


Hello,

These are preliminary patches to modify dmraid so that we can have
multiple raid_dev structures per physical device.  The DDF1
specification allows for a disk to participate in multiple RAID arrays,
which is what is gained from these patches.  They've been tested against
2.6.16.19 + dmraid45 on Ubuntu 6.06, and seem to be pretty stable.  At
this stage, I'm looking for comments about the code because it touches
core dmraid code and could (but shouldn't) break support for hardware
that I don't have.

This patch changes the DDF handler:

- Function prototypes of read_raid_dev and setup_rd are fixed up.

- Modifies setup_rd to handle cloning correctly.

- Adds a function get_config_byoffset to return the configuration record
for a given combination of a disk and the data offset.

- Modifies the other get_config_* functions in the DDF handler to demand
either the data offset or the index into the configuration record array.

- Modifies all callers of get_config_* functions to locate the correct
config record.

- Adds a function num_devs to calculate the number of raid_devs we need
to take care of a given metadata blob.  We are assured that the number
of config records in a disk's metadata == the number of arrays in which
the disk participates by the DDF spec.

--D

Signed-off-by: Darrick J. Wong <djwong at us.ibm.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ddf-mdisk.patch
Type: text/x-patch
Size: 8369 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/ataraid-list/attachments/20060601/c94aa773/attachment.bin>


More information about the Ataraid-list mailing list