checkout: fsync() directory on checkouts

We want to be really sure that our deployment roots have hit the disk.
This commit is contained in:
Colin Walters committed 2014-04-11 18:43:13 -04:00
1 parent 7acad0a2e5
commit 1b16553600
1 file changed
+10
+10
View File
@@ -657,6 +657,16 @@ checkout_tree_at (OstreeRepo *self,
}
}
/* Finally, fsync to ensure all entries are on disk. Ultimately
* this should be configurable for the case where we're constructing
* buildroots.
*/
if (fsync (destination_dfd) == -1)
{
ot_util_set_error_from_errno (error, errno);
goto out;
}
ret = TRUE;
out:
if (destination_dfd != -1)