From: Gordon Hecker Date: Fri, 23 Oct 2009 09:24:52 +0000 (+0200) Subject: Optimization: Use the try_hardlink cache/transport flag to optimize storing X-Git-Tag: e2factory-2.3.2rc1~35 X-Git-Url: https://git.e2factory.org/?a=commitdiff_plain;h=c70af7c69dfc9ef1466b063bab837cac7dcf2c0b;p=e2factory.git Optimization: Use the try_hardlink cache/transport flag to optimize storing results to cache and to servers Signed-off-by: Gordon Hecker --- 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