guix/nix/libstore
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.cc daemon: Don't include <linux/fs.h>. 2019-11-13 23:26:35 +01:00
builtins.cc daemon: Run 'guix perform-download' directly. 2019-09-08 11:49:24 +02:00
builtins.hh
derivations.cc
derivations.hh
gc.cc daemon: Account for deleted store files when deduplication is on. 2020-01-12 00:19:09 +01:00
globals.cc daemon: Remove 'NIX_LIBEXEC_DIR'. 2019-09-08 11:49:24 +02:00
globals.hh daemon: Remove 'NIX_LIBEXEC_DIR'. 2019-09-08 11:49:24 +02:00
local-store.cc daemon: Don't include <linux/fs.h>. 2019-11-13 23:26:35 +01:00
local-store.hh daemon: Make 'profiles/per-user' non-world-writable. 2019-10-16 22:53:40 +02:00
misc.cc
misc.hh
optimise-store.cc Remove traces of "GuixSD". 2019-03-13 23:12:43 +01:00
pathlocks.cc
pathlocks.hh
references.cc
references.hh
sqlite.cc
sqlite.hh
store-api.cc daemon: Replace "illegal" by "invalid" in error messages. 2019-06-13 00:44:01 +02:00
store-api.hh daemon: Make 'profiles/per-user' non-world-writable. 2019-10-16 22:53:40 +02:00
worker-protocol.hh