Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4f0a5e01 authored by Jonathan Brassow's avatar Jonathan Brassow Committed by NeilBrown
Browse files

MD RAID1: Further conditionalize 'fullsync'



A RAID1 device does not necessarily need a fullsync if the bitmap can be used instead.

Similar to commit d6b212f4 in raid5.c, if a raid1
device can be brought back (i.e. from a transient failure) it shouldn't need a
complete resync.  Provided the bitmap is not to old, it will have recorded the areas
of the disk that need recovery.

Signed-off-by: default avatarJonathan Brassow <jbrassow@redhat.com>
Signed-off-by: default avatarNeilBrown <neilb@suse.de>
parent c32fb9e7
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -2600,7 +2600,8 @@ static struct r1conf *setup_conf(struct mddev *mddev)
		if (!disk->rdev ||
		    !test_bit(In_sync, &disk->rdev->flags)) {
			disk->head_position = 0;
			if (disk->rdev)
			if (disk->rdev &&
			    (disk->rdev->saved_raid_disk < 0))
				conf->fullsync = 1;
		} else if (conf->last_used < 0)
			/*