summaryrefslogtreecommitdiff
path: root/drivers/md
diff options
context:
space:
mode:
authorLi Nan <linan122@huawei.com>2023-05-27 18:18:51 +0800
committerSong Liu <song@kernel.org>2023-06-13 15:25:42 -0700
commit4d8a5754a694062f349b8bf66856561e3840c7e5 (patch)
tree011430752707296bdf2e18645cec18f6d0416833 /drivers/md
parent6090368abcb40554c660c8c3140ce19ff0f8f66f (diff)
md/raid10: clean up md_add_new_disk()
Commit 1a855a060665 ("md: fix bug with re-adding of partially recovered device.") only add device which is set to In_sync. But it let devices without metadata cannot be added when they should be. Commit bf572541ab44 ("md: fix regression with re-adding devices to arrays with no metadata") fix the above issue, it set device without metadata to In_sync when add new disk. However, after commit f466722ca614 ("md: Change handling of save_raid_disk and metadata update during recovery.") deletes changes of the first patch, setting In_sync for devcie without metadata is meanless because the flag will be cleared soon and will not be used during this period. Clean it up. Signed-off-by: Li Nan <linan122@huawei.com> Reviewed-by: Yu Kuai <yukuai3@huawei.com> Signed-off-by: Song Liu <song@kernel.org> Link: https://lore.kernel.org/r/20230527101851.3266500-2-linan666@huaweicloud.com
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/md.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index a6ede3d1c99e..0aec2954e161 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -6746,7 +6746,6 @@ int md_add_new_disk(struct mddev *mddev, struct mdu_disk_info_s *info)
if (info->state & (1<<MD_DISK_SYNC) &&
info->raid_disk < mddev->raid_disks) {
rdev->raid_disk = info->raid_disk;
- set_bit(In_sync, &rdev->flags);
clear_bit(Bitmap_sync, &rdev->flags);
} else
rdev->raid_disk = -1;