From: NeilBrown Date: Thu, 22 Mar 2012 03:52:21 +0000 (+1100) Subject: Assemble: improve verbose logging when including old devices. X-Git-Tag: mdadm-3.2.4~53 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e62b778573d4df5e729cf3941fe17eff1fe4e758;p=thirdparty%2Fmdadm.git 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 --- diff --git a/Assemble.c b/Assemble.c index fadacf5f..23695e75 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",