]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
super1: fix calculation of space_before
authorNeilBrown <neilb@suse.com>
Thu, 28 Jan 2016 00:44:27 +0000 (11:44 +1100)
committerNeilBrown <neilb@suse.com>
Thu, 28 Jan 2016 00:44:27 +0000 (11:44 +1100)
This code was meant to update 'earliest' but clearly never doesn't.

This bug would only affect an array with a very large bitmap so it is unlikely
to be significant.

Signed-off-by: NeilBrown <neilb@suse.com>
super1.c

index 10e00652c4eed59ae7f4fab4348ec5c6a48c05dd..5d08d4de8155e217091ac228af8ab087c2c94418 100644 (file)
--- a/super1.c
+++ b/super1.c
@@ -979,7 +979,7 @@ static void getinfo_super1(struct supertype *st, struct mdinfo *info, char *map)
                        size /= 512;
                        bmend += size;
                        if (bmend > earliest)
-                               bmend = earliest;
+                               earliest = bmend;
                }
                if (sb->bblog_offset && sb->bblog_size) {
                        unsigned long long bbend = super_offset;