]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Assemble: fix "no uptodate device" message.
authorNeilBrown <neilb@suse.de>
Tue, 7 Apr 2015 23:20:26 +0000 (09:20 +1000)
committerNeilBrown <neilb@suse.de>
Tue, 7 Apr 2015 23:20:26 +0000 (09:20 +1000)
Since we introduced replacement devices, the 'i' used in
start_array() is twice the slot number.

So we need to adjust when printing.

Signed-off-by: NeilBrown <neilb@suse.de>
Assemble.c

index 1e529c1b3126797d216a9c369a3aa8c801a001ef..08d9d1b9b89e04c3db5bb4b2047b46e7617d1014 100644 (file)
@@ -984,7 +984,7 @@ static int start_array(int mdfd,
                } else if (c->verbose > 0 && i < content->array.raid_disks*2
                           && (i&1) == 0)
                        pr_err("no uptodate device for slot %d of %s\n",
-                              i, mddev);
+                              i/2, mddev);
        }
 
        if (content->array.level == LEVEL_CONTAINER) {