Flush disk write cache after storing and clearing metadata.

This commit is contained in:
pjd 2010-04-15 16:35:34 +00:00
parent 1e56ad0204
commit 0d94bcf279

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);