On Tue, Dec 17, 2019 at 4:06 PM Song Liu <liu.song.a23@xxxxxxxxx> wrote: > > On Thu, Nov 21, 2019 at 2:37 AM <jgq516@xxxxxxxxx> wrote: > > > > From: Guoqing Jiang <guoqing.jiang@xxxxxxxxxxxxxxx> > > > > With the new sysfs node, we can use it to control if raid1 array > > wants io serialization or not. So mddev_create_serial_pool and > > mddev_destroy_serial_pool are called in serialize_policy_store > > to enable or disable the serialization. > > > > Signed-off-by: Guoqing Jiang <guoqing.jiang@xxxxxxxxxxxxxxx> > > I added: > > diff --git i/drivers/md/md.c w/drivers/md/md.c > index efeaeba3583d..5a2bb6bcc43d 100644 > --- i/drivers/md/md.c > +++ w/drivers/md/md.c > @@ -5330,6 +5330,9 @@ serialize_policy_store(struct mddev *mddev, > const char *buf, size_t len) > if (value == mddev->serialize_policy) > return len; > > + if (value < 0 || value > 1) > + return -EINVAL; > + > err = mddev_lock(mddev); > if (err) > return err; Actually, this is not necessary. Never mind. Song