diff options
author | Shaohua Li <shli@fb.com> | 2018-10-15 02:05:07 +0200 |
---|---|---|
committer | Shaohua Li <shli@fb.com> | 2018-10-15 02:05:07 +0200 |
commit | 9e753ba9b9b405e3902d9f08aec5f2ea58a0c317 (patch) | |
tree | e13775c41d767d74ea43520db9d064829f7a133b /drivers/md/md.c | |
parent | md/bitmap: use mddev_suspend/resume instead of ->quiesce() (diff) | |
download | linux-9e753ba9b9b405e3902d9f08aec5f2ea58a0c317.tar.xz linux-9e753ba9b9b405e3902d9f08aec5f2ea58a0c317.zip |
MD: fix invalid stored role for a disk - try2
Commit d595567dc4f0 (MD: fix invalid stored role for a disk) broke linear
hotadd. Let's only fix the role for disks in raid1/10.
Based on Guoqing's original patch.
Reported-by: kernel test robot <rong.a.chen@intel.com>
Cc: Gioh Kim <gi-oh.kim@profitbricks.com>
Cc: Guoqing Jiang <gqjiang@suse.com>
Signed-off-by: Shaohua Li <shli@fb.com>
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r-- | drivers/md/md.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index 62bf96daa157..4c0f3e0331d5 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -1774,10 +1774,6 @@ static int super_1_validate(struct mddev *mddev, struct md_rdev *rdev) } else set_bit(In_sync, &rdev->flags); rdev->raid_disk = role; - if (role >= mddev->raid_disks) { - rdev->saved_raid_disk = -1; - rdev->raid_disk = -1; - } break; } if (sb->devflags & WriteMostly1) |