Re: t_group type of raid set in DMRAID

Heinz Mauelshagen <[email protected]>
Newsgroups gmane.linux.ataraid
Message-ID <[email protected]>
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
> [email protected]
> https://www.redhat.com/mailman/listinfo/ataraid-list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.