3
5
Fork 0
mirror of git://git.savannah.gnu.org/guix.git synced 2023-12-14 03:33:07 +01:00
guix/nix/libutil
Ludovic Courtès 7033c7692c
daemon: Account for deleted store files when deduplication is on.
Previously, a store item that is a regular file would not be accounted
for in the 'bytesFreed' value computed by 'deletePath' because its
'st_nlink' count would always be >= 2.  This commit fixes that.

* nix/libutil/util.hh (deletePath): Add optional 'linkThreshold' argument.
* nix/libutil/util.cc (_deletePath): Add 'linkThreshold' argument and
honor it.  Pass it down in recursive call.
(deletePath): Add 'linkThreshold' and honor it.
* nix/libstore/gc.cc (LocalStore::deleteGarbage): Pass 'linkThreshold'
argument to 'deletePath', with a value of 2 when PATH is a store item
and deduplication is on.
2020-01-12 00:19:09 +01:00
..
.gitignore build: Include a copy of Nix's libstore and daemon; build it. 2012-12-03 23:05:08 +01:00
affinity.cc Merge branch 'nix' into 'master'. 2014-12-19 22:47:37 +01:00
affinity.hh Merge branch 'nix' into 'master'. 2014-12-19 22:47:37 +01:00
archive.cc daemon: Use unbranded phrases in comments and messages. 2018-12-16 16:28:07 +01:00
archive.hh daemon: Remove "case hack" for nars. 2018-10-02 23:08:30 +02:00
gcrypt-hash.cc daemon: Fix 'HashSink::currentHash()'. 2013-12-19 00:02:49 +01:00
gcrypt-hash.hh daemon: Fix 'HashSink::currentHash()'. 2013-12-19 00:02:49 +01:00
hash.cc daemon: Support SHA-512 hashes. 2015-12-02 19:37:59 +02:00
hash.hh daemon: Support SHA-512 hashes. 2015-12-02 19:37:59 +02:00
md5.h Update license headers. 2013-01-06 00:47:50 +01:00
serialise.cc Merge branch 'nix'. 2015-05-19 16:09:58 +02:00
serialise.hh Merge branch 'nix'. 2015-05-19 16:09:58 +02:00
sha1.h Update license headers. 2013-01-06 00:47:50 +01:00
sha256.h Update license headers. 2013-01-06 00:47:50 +01:00
sha512.h daemon: Support SHA-512 hashes. 2015-12-02 19:37:59 +02:00
types.hh Merge branch 'nix'. 2015-05-19 16:09:58 +02:00
util.cc daemon: Account for deleted store files when deduplication is on. 2020-01-12 00:19:09 +01:00
util.hh daemon: Account for deleted store files when deduplication is on. 2020-01-12 00:19:09 +01:00