On Thu, Jul 2, 2020 at 5:05 AM Yufen Yu <yuyufen@xxxxxxxxxx> wrote: > > Here, we don't support setting stripe_size by sysfs. > Following patches will do that. > > Signed-off-by: Yufen Yu <yuyufen@xxxxxxxxxx> > --- > drivers/md/raid5.c | 22 ++++++++++++++++++++++ > 1 file changed, 22 insertions(+) > > diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c > index 2981b853c388..51bc39dab57b 100644 > --- a/drivers/md/raid5.c > +++ b/drivers/md/raid5.c > @@ -6518,6 +6518,27 @@ raid5_rmw_level = __ATTR(rmw_level, S_IRUGO | S_IWUSR, > raid5_show_rmw_level, > raid5_store_rmw_level); > > +static ssize_t > +raid5_show_stripe_size(struct mddev *mddev, char *page) > +{ > + struct r5conf *conf = mddev->private; > + > + if (conf) > + return sprintf(page, "%d\n", conf->stripe_size); > + else > + return 0; > +} > + > +static ssize_t > +raid5_store_stripe_size(struct mddev *mddev, const char *page, size_t len) > +{ > + return -EINVAL; > +} How about we make the file read only for now? Song