aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/gc.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-09-03 11:30:15 +0200
committerEelco Dolstra <edolstra@gmail.com>2020-09-03 11:30:15 +0200
commit8a945d6ddb0676b454458e6fe0e9ea6f8b4b5659 (patch)
treedb4113eecbf4ad9577d47011bda78c10820a5dd3 /src/libstore/gc.cc
parent82b77a77262c414044fffc7ad8b955ad91827995 (diff)
Remove gc-check-reachability
Diffstat (limited to 'src/libstore/gc.cc')
-rw-r--r--src/libstore/gc.cc16
1 files changed, 0 insertions, 16 deletions
diff --git a/src/libstore/gc.cc b/src/libstore/gc.cc
index 81f812604..e6cbc525d 100644
--- a/src/libstore/gc.cc
+++ b/src/libstore/gc.cc
@@ -101,22 +101,6 @@ Path LocalFSStore::addPermRoot(const StorePath & storePath, const Path & _gcRoot
makeSymlink(gcRoot, printStorePath(storePath));
addIndirectRoot(gcRoot);
- /* Check that the root can be found by the garbage collector.
- !!! This can be very slow on machines that have many roots.
- Instead of reading all the roots, it would be more efficient to
- check if the root is in a directory in or linked from the
- gcroots directory. */
- if (settings.checkRootReachability) {
- auto roots = findRoots(false);
- if (roots[storePath].count(gcRoot) == 0)
- logWarning({
- .name = "GC root",
- .hint = hintfmt("warning: '%1%' is not in a directory where the garbage collector looks for roots; "
- "therefore, '%2%' might be removed by the garbage collector",
- gcRoot, printStorePath(storePath))
- });
- }
-
/* Grab the global GC root, causing us to block while a GC is in
progress. This prevents the set of permanent roots from
increasing while a GC is in progress. */