dm raid: fix use of wrong status char during resynchronization
authorHeinz Mauelshagen <heinzm@redhat.com>
Wed, 3 Aug 2016 20:57:49 +0000 (22:57 +0200)
committerMike Snitzer <snitzer@redhat.com>
Thu, 4 Aug 2016 14:05:30 +0000 (10:05 -0400)
During a resynchronization, device status char 'a' is output on the raid
status line for every device of a RAID set.  It changes from 'a' to 'A'
(unless device failure) when the resynchronization completes.

Interrupting and restarting a resynchronization, by reloading the DM
table, erroneously lead to status char 'A'.

Fix this by avoiding setting the MD_RECOVERY_REQUESTED flag in
raid_preresume().

Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-raid.c

index 7b403ab41bd3885c66e9e6dae736632038bd7596..1b9795d75ef898cd172bde67d1323ee8736606c3 100644 (file)
@@ -3578,7 +3578,6 @@ static int raid_preresume(struct dm_target *ti)
        /* Be prepared for mddev_resume() in raid_resume() */
        set_bit(MD_RECOVERY_FROZEN, &mddev->recovery);
        if (mddev->recovery_cp && mddev->recovery_cp < MaxSector) {
-               set_bit(MD_RECOVERY_REQUESTED, &mddev->recovery);
                set_bit(MD_RECOVERY_SYNC, &mddev->recovery);
                mddev->resync_min = mddev->recovery_cp;
        }