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;
|
error = errno;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
(void)ioctl(fd, DIOCGFLUSH, NULL);
|
||||||
out:
|
out:
|
||||||
if (sector != NULL)
|
if (sector != NULL)
|
||||||
free(sector);
|
free(sector);
|
||||||
@ -293,6 +294,7 @@ g_metadata_clear(const char *name, const char *magic)
|
|||||||
error = errno;
|
error = errno;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
(void)ioctl(fd, DIOCGFLUSH, NULL);
|
||||||
out:
|
out:
|
||||||
if (sector != NULL)
|
if (sector != NULL)
|
||||||
free(sector);
|
free(sector);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user