guix/nix
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
..
boost
libstore daemon: Account for deleted store files when deduplication is on. 2020-01-12 00:19:09 +01:00
libutil daemon: Account for deleted store files when deduplication is on. 2020-01-12 00:19:09 +01:00
nix-daemon
.gitignore
AUTHORS
COPYING
local.mk