diff options
author | Ludovic Courtès <ludo@gnu.org> | 2020-01-11 18:46:23 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2020-01-12 00:19:09 +0100 |
commit | 7033c7692ccbbbad8f7b9952015de071a5588e87 (patch) | |
tree | b9745bafa5fc88819f55224aa06a048d760ca063 /ChangeLog | |
parent | 79154f0a09ad748839f88120ddd61a0e1e147b5e (diff) | |
download | patches-7033c7692ccbbbad8f7b9952015de071a5588e87.tar patches-7033c7692ccbbbad8f7b9952015de071a5588e87.tar.gz |
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.
Diffstat (limited to 'ChangeLog')
0 files changed, 0 insertions, 0 deletions