On 11/4/19 9:01 PM, Nigel Croxon wrote:
+static ssize_t raid456_retry_re_store(struct mddev *mddev, const char *buf, size_t len) +{ + int retry; + + if (!mddev->private) + return -ENODEV; + + if (len > 1 || + kstrtoint(buf, 10, &retry) ||
Maybe kstrtobool fits better here if the value should only be 1 or 0.
+ retry < 0 || retry > 1) + return -EINVAL; + + set_raid456_retry_re(mddev, retry); + return len; +}
I'd suggest use raid5 instead of raid456 since all the levels are implemented inside
raid5.c. Thanks, Guoqing