* [PATCH] fetch2/git: Stop git from triggering fsync() calls
@ 2014-04-26 10:20 Richard Purdie
0 siblings, 0 replies; only message in thread
From: Richard Purdie @ 2014-04-26 10:20 UTC (permalink / raw)
To: bitbake-devel
We only ever clone other repositories, if there were a problem such as power
failure, we'd blow away data and rebuild. As such we don't need fsync(). With
filesystems like ext*, the fsync pushes nearly all the data out to disk
which impacts all running processes.
We therefore set a configuration parameter to disable the fsync() calls.
Also fixup a case where basecmd wasn't being used for no good reason.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py
index ecaaaf9..7c0c95c 100644
--- a/bitbake/lib/bb/fetch2/git.py
+++ b/bitbake/lib/bb/fetch2/git.py
@@ -124,7 +124,7 @@ class Git(FetchMethod):
ud.branches[name] = branch
ud.unresolvedrev[name] = branch
- ud.basecmd = data.getVar("FETCHCMD_git", d, True) or "git"
+ ud.basecmd = data.getVar("FETCHCMD_git", d, True) or "git -c core.fsyncobjectfiles=0"
ud.write_tarballs = ((data.getVar("BB_GENERATE_MIRROR_TARBALLS", d, True) or "0") != "0") or ud.rebaseable
@@ -276,7 +276,7 @@ class Git(FetchMethod):
os.symlink(ud.clonedir, indirectiondir)
clonedir = indirectiondir
- runfetchcmd("git clone %s %s/ %s" % (cloneflags, clonedir, destdir), d)
+ runfetchcmd("%s clone %s %s/ %s" % (ud.basecmd, cloneflags, clonedir, destdir), d)
if not ud.nocheckout:
os.chdir(destdir)
if subdir != "":
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-04-26 10:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-26 10:20 [PATCH] fetch2/git: Stop git from triggering fsync() calls Richard Purdie
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.