1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-07 01:51:47 +02:00

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.
This commit is contained in:
Eelco Dolstra 2012-03-26 20:00:02 +02:00
parent 19d9762ad5
commit 8be1979f1a
7 changed files with 3 additions and 30 deletions

View file

@ -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);