]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Call 'flush' after writing a superblock to disk.
authorNeil Brown <neilb@suse.de>
Mon, 4 Apr 2005 06:05:07 +0000 (06:05 +0000)
committerNeil Brown <neilb@suse.de>
Mon, 4 Apr 2005 06:05:07 +0000 (06:05 +0000)
Just in case...

Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
ChangeLog
util.c

index 685485830b185bb97c23e0d205450543fe0e5521..33e729be9a60f3d185e5ed9cab423f27f87eadfb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,8 @@
 Changes Prior to 1.10.0 release
     -   Fix bug with --config=partitions
     -   Open sub-devices with O_EXCL to detect if already in use
-
+    -   Make sure superblock updates are flushed directly to disk.
+       
 Changes Prior to 1.9.0 release
     -   Fix rpm build problem (stray %)
     -   Minor manpage updates
diff --git a/util.c b/util.c
index 05eb9c901112b45fb5eb9818e608c497ea6d5940..d5e2910c60cf242606bd04ad401b4ee125c650d7 100644 (file)
--- a/util.c
+++ b/util.c
@@ -278,6 +278,7 @@ int store_super(int fd, mdp_super_t *super)
        if (write(fd, super, sizeof(*super)) != sizeof(*super))
                return 4;
 
+       fsync(fd);
        return 0;
 }