Skip to content

Commit 4d8a575

Browse files
Li Nanliu-song-6
authored andcommitted
md/raid10: clean up md_add_new_disk()
Commit 1a855a0 ("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 bf57254 ("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 f466722 ("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
1 parent 6090368 commit 4d8a575

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

drivers/md/md.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6746,7 +6746,6 @@ int md_add_new_disk(struct mddev *mddev, struct mdu_disk_info_s *info)
67466746
if (info->state & (1<<MD_DISK_SYNC) &&
67476747
info->raid_disk < mddev->raid_disks) {
67486748
rdev->raid_disk = info->raid_disk;
6749-
set_bit(In_sync, &rdev->flags);
67506749
clear_bit(Bitmap_sync, &rdev->flags);
67516750
} else
67526751
rdev->raid_disk = -1;

0 commit comments

Comments
 (0)