1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-08 23:33:55 +02:00

Merge pull request #3790 from basvandijk/2.3-gc-fix

Cherry-pick "Use fragment size for autoGC capacity calculation" on 2.3
This commit is contained in:
Eelco Dolstra 2020-07-08 20:50:48 +02:00 committed by GitHub
commit 975efd530c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -876,7 +876,7 @@ void LocalStore::autoGC(bool sync)
if (statvfs(realStoreDir.c_str(), &st)) if (statvfs(realStoreDir.c_str(), &st))
throw SysError("getting filesystem info about '%s'", realStoreDir); throw SysError("getting filesystem info about '%s'", realStoreDir);
return (uint64_t) st.f_bavail * st.f_bsize; return (uint64_t) st.f_bavail * st.f_frsize;
}; };
std::shared_future<void> future; std::shared_future<void> future;