From e62b778573d4df5e729cf3941fe17eff1fe4e758 Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Thu, 22 Mar 2012 14:52:21 +1100 Subject: [PATCH] Assemble: improve verbose logging when including old devices. Reporting: mdadm: added /dev/loop1 to /dev/md0 as 1 mdadm: added /dev/loop2 to /dev/md0 as 2 mdadm: added /dev/loop0 to /dev/md0 as 0 mdadm: /dev/md0 has been started with 2 drives (out of 3). is confusing - why only 2? Code now reports: mdadm: added /dev/loop1 to /dev/md0 as 1 mdadm: added /dev/loop2 to /dev/md0 as 2 (possibly out of date) mdadm: added /dev/loop0 to /dev/md0 as 0 mdadm: /dev/md0 has been started with 2 drives (out of 3). which is somewhat clearer. Signed-off-by: NeilBrown --- Assemble.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Assemble.c b/Assemble.c index fadacf5..23695e7 100644 --- a/Assemble.c +++ b/Assemble.c @@ -1334,9 +1334,11 @@ int Assemble(struct supertype *st, char *mddev, sparecnt--; } else if (verbose > 0) fprintf(stderr, Name ": added %s " - "to %s as %d\n", + "to %s as %d%s\n", devices[j].devname, mddev, - devices[j].i.disk.raid_disk); + devices[j].i.disk.raid_disk, + devices[j].uptodate?"": + " (possibly out of date)"); } else if (verbose > 0 && i < content->array.raid_disks) fprintf(stderr, Name ": no uptodate device for " "slot %d of %s\n",