Flush disk write cache after storing and clearing metadata.

This commit is contained in:
Pawel Jakub Dawidek 2010-04-15 16:35:34 +00:00
parent 31c4cef715
commit 54ddff9dfa
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=206666

View File

@ -236,6 +236,7 @@ g_metadata_store(const char *name, u_char *md, size_t size)
error = errno;
goto out;
}
(void)ioctl(fd, DIOCGFLUSH, NULL);
out:
if (sector != NULL)
free(sector);
@ -293,6 +294,7 @@ g_metadata_clear(const char *name, const char *magic)
error = errno;
goto out;
}
(void)ioctl(fd, DIOCGFLUSH, NULL);
out:
if (sector != NULL)
free(sector);