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 <neilb@suse.de>
This commit is contained in:
NeilBrown 2012-03-22 14:52:21 +11:00
parent d4633e06df
commit e62b778573
1 changed files with 4 additions and 2 deletions

View File

@ -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",