On Tue, May 28, 2019 at 5:42 AM Xiao Ni <xni@xxxxxxxxxx> wrote: > > In d5d885fd(md: introduce new personality funciton start()) it splits the init > job to two parts. The first part run() does the jobs that do not require the > md threads. The second part start() does the jobs that require the md threads. nit: checkpatch.pl complains WARNING: Possible unwrapped commit description (prefer a maximum 75 chars per line) #57: In d5d885fd(md: introduce new personality funciton start()) it splits the init I fixed this in my tree, so no need to resend. > > Now it just does run() in adding new journal device. It needs to do the second > part start() too. > > Fixes: f6b6ec5cfac(raid5-cache: add journal hot add/remove support) Shall we say Fixes d5d885fd(md: introduce new personality funciton start()) here? Or do we really need the fix to earlier versions with f6b6ec5cfac? Thanks, Song > Reported-by: Michal Soltys <soltys@xxxxxxxx> > Signed-off-by: Xiao Ni <xni@xxxxxxxxxx> > --- > drivers/md/raid5.c | 11 +++++++++-- > 1 file changed, 9 insertions(+), 2 deletions(-) > > diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c > index 7fde645..0e52f1d 100644 > --- a/drivers/md/raid5.c > +++ b/drivers/md/raid5.c > @@ -7680,7 +7680,7 @@ static int raid5_remove_disk(struct mddev *mddev, struct md_rdev *rdev) > static int raid5_add_disk(struct mddev *mddev, struct md_rdev *rdev) > { > struct r5conf *conf = mddev->private; > - int err = -EEXIST; > + int ret, err = -EEXIST; > int disk; > struct disk_info *p; > int first = 0; > @@ -7695,7 +7695,14 @@ static int raid5_add_disk(struct mddev *mddev, struct md_rdev *rdev) > * The array is in readonly mode if journal is missing, so no > * write requests running. We should be safe > */ > - log_init(conf, rdev, false); > + ret = log_init(conf, rdev, false); > + if (ret) > + return ret; > + > + ret = r5l_start(conf->log); > + if (ret) > + return ret; > + > return 0; > } > if (mddev->recovery_disabled == conf->recovery_disabled) > -- > 2.7.5 >