diff options
author | Guoqing Jiang <gqjiang@suse.com> | 2017-04-24 15:58:04 +0800 |
---|---|---|
committer | Shaohua Li <shli@fb.com> | 2017-04-25 09:36:29 -0700 |
commit | e5bc9c3c5432f5531a58e6fdd9f6c6587f2137b3 (patch) | |
tree | 7bd80fcacc5e294ea3da9623bfd352e0aa6fb970 /drivers/md/raid5.c | |
parent | 296617581eac713b3fda588216ae6d16d1e76dd5 (diff) |
md: clear WantReplacement once disk is removed
We can clear 'WantReplacement' flag directly no
matter it's replacement existed or not since the
semantic is same as before.
Also since the disk is removed from array, then
it is straightforward to remove 'WantReplacement'
flag and the comments in raid10/5 can be removed
as well.
Signed-off-by: Guoqing Jiang <gqjiang@suse.com>
Signed-off-by: Shaohua Li <shli@fb.com>
Diffstat (limited to 'drivers/md/raid5.c')
-rw-r--r-- | drivers/md/raid5.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 356cd9c7c753..3d971e5a1b0e 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c @@ -7603,15 +7603,12 @@ static int raid5_remove_disk(struct mddev *mddev, struct md_rdev *rdev) * but will never see neither - if they are careful */ p->replacement = NULL; - clear_bit(WantReplacement, &rdev->flags); if (!err) err = log_modify(conf, p->rdev, true); - } else - /* We might have just removed the Replacement as faulty- - * clear the bit just in case - */ - clear_bit(WantReplacement, &rdev->flags); + } + + clear_bit(WantReplacement, &rdev->flags); abort: print_raid5_conf(conf); |