From c70af7c69dfc9ef1466b063bab837cac7dcf2c0b Mon Sep 17 00:00:00 2001 From: Gordon Hecker Date: Fri, 23 Oct 2009 11:24:52 +0200 Subject: [PATCH] Optimization: Use the try_hardlink cache/transport flag to optimize storing results to cache and to servers Signed-off-by: Gordon Hecker --- Changelog | 5 +++++ local/e2build.lua | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Changelog b/Changelog index 1087b10..3b3c58d 100644 --- 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 diff --git a/local/e2build.lua b/local/e2build.lua index 42826e1..bdb2656 100644 --- a/local/e2build.lua +++ b/local/e2build.lua @@ -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 -- 2.39.5