diff options
author | Neil Brown <neilb@suse.de> | 2006-10-16 14:39:06 +1000 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2006-10-16 14:39:06 +1000 |
commit | 97a6748ce2fc70f35b599bd16b76d16a1e48bc0d (patch) | |
tree | d183f9373cbc045d46a51a9c4ea3c84337bc6ccd /bitmap.c | |
parent | 0a816ef9fb8202707cc76a943678307c252939cf (diff) | |
download | mdadm-97a6748ce2fc70f35b599bd16b76d16a1e48bc0d.tar.gz mdadm-97a6748ce2fc70f35b599bd16b76d16a1e48bc0d.tar.xz mdadm-97a6748ce2fc70f35b599bd16b76d16a1e48bc0d.zip |
Flush bitmap file before truncate.
Otheriwse the last write happens on fclose which is after ftruncate,
to the truncate has no effect.
Diffstat (limited to 'bitmap.c')
-rw-r--r-- | bitmap.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -390,6 +390,7 @@ int CreateBitmap(char *filename, int force, char uuid[16], } rv = 0; + fflush(fp); /* make the file be the right size (well, to the nearest byte) */ if (ftruncate(fileno(fp), filesize)) perror("ftrunace"); |