dm raid: ensure 'a' chars during reshape
authorHeinz Mauelshagen <heinzm@redhat.com>
Wed, 13 Dec 2017 16:13:19 +0000 (17:13 +0100)
committerMike Snitzer <snitzer@redhat.com>
Wed, 13 Dec 2017 16:57:36 +0000 (11:57 -0500)
During reshape, 'A' chars were reported in status rather than 'a'.

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

index 109b001407a80e0a77886006681b25cd2af05505..af4f40de2c0b309ac63fdc00d05e3c3ee953a4f8 100644 (file)
@@ -3451,6 +3451,15 @@ static sector_t rs_get_progress(struct raid_set *rs, unsigned long recovery,
                         */
                        set_bit(RT_FLAG_RS_RESYNCING, &rs->runtime_flags);
 
+               } else if (test_bit(MD_RECOVERY_RESHAPE, &recovery) &&
+                          !test_bit(MD_RECOVERY_REQUESTED, &recovery)) {
+                       /*
+                        * If "reshape" is occurring, the raid set
+                        * is or may be out of sync hence the health
+                        * characters shall be 'a'.
+                        */
+                       set_bit(RT_FLAG_RS_RESYNCING, &rs->runtime_flags);
+
                } else if (test_bit(MD_RECOVERY_REQUESTED, &recovery)) {
                        /*
                         * If "check" or "repair" is occurring, the raid set has