>From 83eab3d63b6c72304daf442ce5ed6c88295aed25 Mon Sep 17 00:00:00 2001 From: Vadim Rutkovsky Date: Wed, 4 Jun 2014 01:40:32 +0200 Subject: [PATCH] Skip fsync during checkout if disable_fsync is on --- src/libostree/ostree-repo-checkout.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/libostree/ostree-repo-checkout.c b/src/libostree/ostree-repo-checkout.c index 7bf8328..417e11f 100644 --- a/src/libostree/ostree-repo-checkout.c +++ b/src/libostree/ostree-repo-checkout.c @@ -661,10 +661,13 @@ checkout_tree_at (OstreeRepo *self, * this should be configurable for the case where we're constructing * buildroots. */ - if (fsync (destination_dfd) == -1) + if (!self->disable_fsync) { - ot_util_set_error_from_errno (error, errno); - goto out; + if (fsync (destination_dfd) == -1) + { + ot_util_set_error_from_errno (error, errno); + goto out; + } } ret = TRUE; -- 1.9.3