File 0155-super1-fix-calculation-of-space_before.patch of Package mdadm.5365
From ac92b44a8736071fef61116d04b4e1bfebee30ab Mon Sep 17 00:00:00 2001
From: NeilBrown <neilb@suse.com>
Date: Thu, 28 Jan 2016 11:44:27 +1100
Subject: [PATCH 215/359] super1: fix calculation of space_before
References: bsc#1081910
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>
Signed-off-by: Coly Li <colyli@suse.de>
---
super1.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/super1.c b/super1.c
index 10e0065..5d08d4d 100644
--- 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;
--
2.16.1