diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-03-26 20:00:02 +0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-03-26 20:00:02 +0200 |
commit | 8be1979f1ae4b85c36988f7b3cf8240c9682dc54 (patch) | |
tree | 80ec98cfb3ec5a86b72a9ee9f07d3ede4ee36b3c /src/libstore | |
parent | 19d9762ad5fc8d8db3e9a545a89309f08572cc9f (diff) | |
download | guix-8be1979f1ae4b85c36988f7b3cf8240c9682dc54.tar.gz |
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')
-rw-r--r-- | src/libstore/gc.cc | 12 | ||||
-rw-r--r-- | src/libstore/remote-store.cc | 2 | ||||
-rw-r--r-- | src/libstore/store-api.cc | 1 | ||||
-rw-r--r-- | src/libstore/store-api.hh | 4 |
4 files changed, 2 insertions, 17 deletions
diff --git a/src/libstore/gc.cc b/src/libstore/gc.cc index 95c7154110..d81bf40c73 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); diff --git a/src/libstore/remote-store.cc b/src/libstore/remote-store.cc index c77a128705..0b8fa36f6d 100644 --- a/src/libstore/remote-store.cc +++ b/src/libstore/remote-store.cc @@ -466,7 +466,7 @@ void RemoteStore::collectGarbage(const GCOptions & options, GCResults & results) writeStrings(options.pathsToDelete, to); writeInt(options.ignoreLiveness, to); writeLongLong(options.maxFreed, to); - writeInt(options.maxLinks, to); + writeInt(0, to); if (GET_PROTOCOL_MINOR(daemonVersion) >= 5) { /* removed options */ writeInt(0, to); diff --git a/src/libstore/store-api.cc b/src/libstore/store-api.cc index 36ade21708..19bc048abd 100644 --- a/src/libstore/store-api.cc +++ b/src/libstore/store-api.cc @@ -13,7 +13,6 @@ GCOptions::GCOptions() action = gcDeleteDead; ignoreLiveness = false; maxFreed = 0; - maxLinks = 0; } diff --git a/src/libstore/store-api.hh b/src/libstore/store-api.hh index 61bcaf5050..a62a648168 100644 --- a/src/libstore/store-api.hh +++ b/src/libstore/store-api.hh @@ -53,10 +53,6 @@ struct GCOptions no limit. */ unsigned long long maxFreed; - /* Stop after the number of hard links to the Nix store directory - has dropped below `maxLinks'. */ - unsigned int maxLinks; - GCOptions(); }; |