]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
md: Push down reconstruction log message to personality code.
authorAndre Noll <maan@systemlinux.org>
Wed, 17 Jun 2009 22:48:06 +0000 (08:48 +1000)
committerNeilBrown <neilb@suse.de>
Wed, 17 Jun 2009 22:48:06 +0000 (08:48 +1000)
Currently, the md layer checks in analyze_sbs() if the raid level
supports reconstruction (mddev->level >= 1) and if reconstruction is
in progress (mddev->recovery_cp != MaxSector).

Move that printk into the personality code of those raid levels that
care (levels 1, 4, 5, 6, 10).

Signed-off-by: Andre Noll <maan@systemlinux.org>
Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/md.c
drivers/md/raid1.c
drivers/md/raid10.c
drivers/md/raid5.c

index 80f039ec3ac21cc7d2da43e4a90210a1a7c74e39..90147370bfd762a3c41697e73d67135c271938d1 100644 (file)
@@ -2604,15 +2604,6 @@ static void analyze_sbs(mddev_t * mddev)
                        clear_bit(In_sync, &rdev->flags);
                }
        }
-
-
-
-       if (mddev->recovery_cp != MaxSector &&
-           mddev->level >= 1)
-               printk(KERN_ERR "md: %s: raid array is not clean"
-                      " -- starting background reconstruction\n",
-                      mdname(mddev));
-
 }
 
 static void md_safemode_timeout(unsigned long data);
index 12f8f34f17ae031a6b77cac216870e5de322d7c4..89939a7aef570b7673f163b0754bd87493646b25 100644 (file)
@@ -2052,6 +2052,10 @@ static int run(mddev_t *mddev)
                goto out_free_conf;
        }
 
+       if (mddev->recovery_cp != MaxSector)
+               printk(KERN_NOTICE "raid1: %s is not clean"
+                      " -- starting background reconstruction\n",
+                      mdname(mddev));
        printk(KERN_INFO 
                "raid1: raid set %s active with %d out of %d mirrors\n",
                mdname(mddev), mddev->raid_disks - mddev->degraded, 
index 30029a312cf5a575f236a28a9d074356244e1c11..ae12ceafe10c557fa79d4e6c367ceae44d144327 100644 (file)
@@ -2186,6 +2186,10 @@ static int run(mddev_t *mddev)
                goto out_free_conf;
        }
 
+       if (mddev->recovery_cp != MaxSector)
+               printk(KERN_NOTICE "raid10: %s is not clean"
+                      " -- starting background reconstruction\n",
+                      mdname(mddev));
        printk(KERN_INFO
                "raid10: raid set %s active with %d out of %d devices\n",
                mdname(mddev), mddev->raid_disks - mddev->degraded,
index 5ea2bdece278f34c190b87a65124a7febf65413d..8f2e3740a05ab76b0c793c412bb1a79ab2f6b3de 100644 (file)
@@ -4454,6 +4454,10 @@ static int run(mddev_t *mddev)
        int working_disks = 0;
        mdk_rdev_t *rdev;
 
+       if (mddev->recovery_cp != MaxSector)
+               printk(KERN_NOTICE "raid5: %s is not clean"
+                      " -- starting background reconstruction\n",
+                      mdname(mddev));
        if (mddev->reshape_position != MaxSector) {
                /* Check that we can continue the reshape.
                 * Currently only disks can change, it must