getinfo_super() can clear entire 'inf' structure before filling with new information. Disk number required later is lost. Restore disk number information after getinfo_super() call. Signed-off-by: Adam Kwolek <adam.kwolek@xxxxxxxxx> --- Create.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Create.c b/Create.c index 7b4d0fe..d01dea7 100644 --- a/Create.c +++ b/Create.c @@ -805,7 +805,6 @@ int Create(struct supertype *st, char *mddev, switch(pass) { case 1: *inf = info; - inf->disk.number = dnum; inf->disk.raid_disk = dnum; if (inf->disk.raid_disk < raiddisks) @@ -856,12 +855,13 @@ int Create(struct supertype *st, char *mddev, /* getinfo_super might have lost these ... */ inf->disk.major = major(stb.st_rdev); inf->disk.minor = minor(stb.st_rdev); + inf->disk.number = dnum; + inf->disk.raid_disk = dnum; } break; case 2: inf->errors = 0; rv = 0; - rv = add_disk(mdfd, st, &info, inf); if (rv) { -- To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html