about summary refs log tree commit diff
path: root/src/libstore/gc.cc
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2012-03-26T18·00+0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2012-03-26T18·00+0200
commit8be1979f1ae4b85c36988f7b3cf8240c9682dc54 (patch)
tree80ec98cfb3ec5a86b72a9ee9f07d3ede4ee36b3c /src/libstore/gc.cc
parent19d9762ad5fc8d8db3e9a545a89309f08572cc9f (diff)
Remove the --max-links GC option
We don't need this anymore now that current filesystems support more
than 32,000 files in a directory.
Diffstat (limited to 'src/libstore/gc.cc')
-rw-r--r--src/libstore/gc.cc12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/libstore/gc.cc b/src/libstore/gc.cc
index 95c7154110b3..d81bf40c73da 100644
--- a/src/libstore/gc.cc
+++ b/src/libstore/gc.cc
@@ -418,7 +418,7 @@ bool LocalStore::isActiveTempFile(const GCState & state,
         && state.tempRoots.find(string(path, 0, path.size() - suffix.size())) != state.tempRoots.end();
 }
 
-    
+
 bool LocalStore::tryToDelete(GCState & state, const Path & path)
 {
     checkInterrupt();
@@ -514,16 +514,6 @@ bool LocalStore::tryToDelete(GCState & state, const Path & path)
             throw GCLimitReached();
         }
 
-        if (state.options.maxLinks) {
-            struct stat st;
-            if (stat(nixStore.c_str(), &st) == -1)
-                throw SysError(format("statting `%1%'") % nixStore);
-            if (st.st_nlink < state.options.maxLinks) {
-                printMsg(lvlInfo, format("link count on the store has dropped below %1%; stopping") % state.options.maxLinks);
-                throw GCLimitReached();
-            }
-        }
-        
     } else
         printMsg(lvlTalkative, format("would delete `%1%'") % path);