t_group type of raid set in DMRAID
Heinz Mauelshagen
mauelshagen at redhat.com
Tue Jul 10 14:43:26 UTC 2007
On Thu, Jul 05, 2007 at 04:40:21PM -0700, Fang, Ying wrote:
> Hello,
>
> I'd like to know if the t_group type of raid set is mandatory or
> optional if a group of disks can hold more than one raid sets, such as
> ISW's volumes.
It is optional.
I designed it to address the needs of metadata formats such as isw or ddf1.
>
> Also, I don't understand why "len2>len1" matters in the following
> function in metadata.c. It screws up -s option usage for the ISW handler
> as the group set name is smaller than that of a real raid set.
The idea was to support substrings in names.
The better solution would be regular expressions because of the
shortcomming you spotted.
Heinz
>
> /*
> * Group RAID set(s)
> *
> * name = NULL : build all sets
> * name = String: build just the one set
> */
> static void want_set(struct lib_context *lc, struct raid_set *rs, char
> *name)
> {
> if (name) {
> size_t len1 = strlen(rs->name), len2 = strlen(name);
>
> if (len2 > len1 || /*(---ying questions this
> condition!)*/
> strncmp(rs->name, name, min(len1, len2))) {
> log_notice(lc, "dropping unwanted RAID set
> \"%s\"",
> rs->name);
> free_raid_set(lc, rs);
> }
> }
> }
>
>
> Thanks,
> Ying
>
> _______________________________________________
> Ataraid-list mailing list
> Ataraid-list at redhat.com
> https://www.redhat.com/mailman/listinfo/ataraid-list
More information about the Ataraid-list
mailing list