Re: [PATCH] md: Subject: introduce get_priority_stripe() to improve raid456 write performance

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, March 29, 2008 6:33 am, Dan Williams wrote:
>  raid5_store_preread_threshold(mddev_t *mddev, const char *page, size_t
> len)
>  {
>  	raid5_conf_t *conf = mddev_to_conf(mddev);
> -	char *end;
> -	int new;
> +	unsigned long new;
>  	if (len >= PAGE_SIZE)
>  		return -EINVAL;
>  	if (!conf)
>  		return -ENODEV;
>
> -	new = simple_strtoul(page, &end, 10);
> -	if (!*page || (*end && *end != '\n'))
> +	if (strict_strtoul(page, 10, &new))
>  		return -EINVAL;
> -	if (new > conf->max_nr_stripes || new < 0)
> +	if (new > conf->max_nr_stripes || (int) new < 0)

I had suggested that "new < 0" test when I saw that 'new' was an 'int'.
A better suggestion would have been to make 'new' 'unsigned'.
Now that you have done that, the "< 0" it pointless and
should go.
Otherwise
  Acked-By: NeilBrown <neilb@xxxxxxx>

Thanks,
NeilBrown

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux