Flush disk write cache after storing and clearing metadata.
This commit is contained in:
parent
31c4cef715
commit
54ddff9dfa
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user