summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeil Brown <neilb@suse.de>2005-04-04 06:05:07 +0000
committerNeil Brown <neilb@suse.de>2005-04-04 06:05:07 +0000
commitb2b46bfc89772da0c9c0249dd185d38b558f2c3a (patch)
treeb3f28847a3cfb0b4049c06705663243d7e0148d8
parentd7eaf49f65ecb99e24255026331b0af7a9245cc2 (diff)
downloadmdadm-b2b46bfc89772da0c9c0249dd185d38b558f2c3a.tar.gz
mdadm-b2b46bfc89772da0c9c0249dd185d38b558f2c3a.tar.xz
mdadm-b2b46bfc89772da0c9c0249dd185d38b558f2c3a.zip
Call 'flush' after writing a superblock to disk.
Just in case... Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
-rw-r--r--ChangeLog3
-rw-r--r--util.c1
2 files changed, 3 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 6854858..33e729b 100644
--- 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 05eb9c9..d5e2910 100644
--- 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;
}