]> git.e2factory.org Git - e2factory.git/commitdiff
Optimization: Use the try_hardlink cache/transport flag to optimize storing
authorGordon Hecker <gh@emlix.com>
Fri, 23 Oct 2009 09:24:52 +0000 (11:24 +0200)
committerGordon Hecker <gh@emlix.com>
Fri, 23 Oct 2009 09:36:09 +0000 (11:36 +0200)
results to cache and to servers

Signed-off-by: Gordon Hecker <gh@emlix.com>
Changelog
local/e2build.lua

index 1087b10fbdfc8f70068d6973742770a9ef31761a..3b3c58d8513ece44fd22df0860e54aaaf587f24c 100644 (file)
--- a/Changelog
+++ b/Changelog
@@ -17,6 +17,11 @@ NEXT:
  * outdated documentation was removed
  * a bug was fixed that lead to partial results being left on local servers
    or in the cache when copying was interrupted
+ * storing results to cache and to servers is optimized by trying to
+   create hardlinks if possible. This may fail due to filesystem boundaries.
+   In that case the code falls back to copying.
+   Hardlinking is not possible if push_permissions is set for the particular
+   server.
 
 e2factory-2.3.1
  * bugfixes
index 42826e17acd48fcffa66f7f32526c225aab93d25..bdb2656ec7e1418dd32501a78127028fdf600141 100644 (file)
@@ -746,7 +746,9 @@ function e2build.store_result(info, r, return_flags)
   local buildid = res.build_mode.buildid(e2tool.buildid(info, r))
   local sourcefile = string.format("%s/result.tar", tmpdir)
   local location1 = string.format("%s/%s/%s/result.tar", location, r, buildid)
-  local cache_flags = {}
+  local cache_flags = {
+    try_hardlink = true,
+  }
   local rc, re = cache.push_file(info.cache, sourcefile, server, location1,
                                                                cache_flags)
   if not rc then