builder: Don't fsync on cache checkouts

tingping/wmclass
Alexander Larsson 2015-12-16 11:18:05 +01:00
parent 739b5ab6db
commit 46558798a2
1 changed files with 4 additions and 0 deletions

View File

@ -195,6 +195,10 @@ builder_cache_open (BuilderCache *self,
{
self->repo = ostree_repo_new (self->cache_dir);
/* We don't need fsync on checkouts as they are transient, and we
rely on the syncfs() in the transaction commit for commits. */
ostree_repo_set_disable_fsync (self->repo, TRUE);
if (!g_file_query_exists (self->cache_dir, NULL))
{
if (!ostree_repo_create (self->repo, OSTREE_REPO_MODE_BARE, NULL, error))