[PATCH] imsm: set generation number when reading superblock

From
Mariusz Dabrowski <hidden>
Date
2016-12-08 11:12:48
IMSM doesn't set 'events' field with generation number, so sometimes mdadm
tries to re-assembly container using metadata which isn't most recent (e. g.
from spare disk).

Signed-off-by: Mariusz Dabrowski <redacted>
---
 super-intel.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/super-intel.c b/super-intel.c
index 0407d43..06b199a 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -3381,6 +3381,7 @@ static void getinfo_super_imsm(struct supertype *st, struct mdinfo *info, char *
 
 	/* do we have the all the insync disks that we expect? */
 	mpb = super->anchor;
+	info->events = __le32_to_cpu(mpb->generation_num);
 
 	for (i = 0; i < mpb->num_raid_devs; i++) {
 		struct imsm_dev *dev = get_imsm_dev(super, i);
-- 
1.8.3.1
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help