From: Neil Brown Date: Mon, 4 Apr 2005 06:05:07 +0000 (+0000) Subject: Call 'flush' after writing a superblock to disk. X-Git-Tag: mdadm-1.10.0~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b2b46bfc89772da0c9c0249dd185d38b558f2c3a;p=thirdparty%2Fmdadm.git Call 'flush' after writing a superblock to disk. Just in case... Signed-off-by: Neil Brown --- diff --git a/ChangeLog b/ChangeLog index 68548583..33e729be 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 05eb9c90..d5e2910c 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; }