1
0
Fork 0

raid5-cache: Need to do start() part job after adding journal device

commit d5d885fd51 ("md: introduce new personality funciton start()")
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.

Now it just does run() in adding new journal device. It needs to do the
second part start() too.

Fixes: d5d885fd51 ("md: introduce new personality funciton start()")
Cc: stable@vger.kernel.org #v4.9+
Reported-by: Michal Soltys <soltys@ziu.info>
Signed-off-by: Xiao Ni <xni@redhat.com>
Signed-off-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
alistair/sunxi64-5.4-dsi
Xiao Ni 2019-06-14 15:41:05 -07:00 committed by Jens Axboe
parent 3f677f9c99
commit d9771f5ec4
1 changed files with 9 additions and 2 deletions

View File

@ -7672,7 +7672,7 @@ abort:
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;
@ -7687,7 +7687,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)