repo: Flip the fsync default to off for new checkout API

Since we're adding a new API, we have the opportunity to fix
the defaults.  We expect clients to do a `syncfs()` or equivalent
on their own now, since it's way more efficient.

Flip the checkout fsync default to off.

Closes: #425
Approved by: giuseppe
This commit is contained in:
Colin Walters authored and Atomic Bot committed 2016-08-04 07:33:31 +00:00
1 parent f66906c401
commit 18d826e3a5
3 files changed
+4 -9

No files matched your search

+2 -2
View File
@@ -106,7 +106,7 @@ static gboolean
fsync_is_enabled (OstreeRepo *self,
OstreeRepoCheckoutAtOptions *options)
{
return !(self->disable_fsync || options->disable_fsync);
return options->enable_fsync || !self->disable_fsync;
}
static gboolean
@@ -860,7 +860,7 @@ ostree_repo_checkout_tree_at (OstreeRepo *self,
new_opts.mode = options->mode;
new_opts.overwrite_mode = options->overwrite_mode;
new_opts.enable_uncompressed_cache = options->enable_uncompressed_cache;
new_opts.disable_fsync = options->disable_fsync;
new_opts.enable_fsync = !options->disable_fsync;
new_opts.process_whiteouts = options->process_whiteouts;
new_opts.no_copy_fallback = options->no_copy_fallback;
new_opts.subpath = options->subpath;