]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - super1.c
recreate journal in mdadm
[thirdparty/mdadm.git] / super1.c
index 1735c2d7c1f2867fa05c54c26d50a6c2d8c43374..893f9bf6eb138eaf601bc0770befe2a608ea1085 100644 (file)
--- a/super1.c
+++ b/super1.c
@@ -1713,7 +1713,8 @@ static int write_init_super1(struct supertype *st)
                if (rfd >= 0)
                        close(rfd);
 
-               sb->events = 0;
+               if (!(di->disk.state & (1<<MD_DISK_JOURNAL)))
+                       sb->events = 0;
 
                refst = dup_super(st);
                if (load_super1(refst, di->fd, NULL)==0) {