about summary refs log tree commit diff
path: root/src/nix-worker/nix-worker.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/nix-worker/nix-worker.cc')
-rw-r--r--src/nix-worker/nix-worker.cc25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/nix-worker/nix-worker.cc b/src/nix-worker/nix-worker.cc
index 0d0964f3a668..d8d86434ea95 100644
--- a/src/nix-worker/nix-worker.cc
+++ b/src/nix-worker/nix-worker.cc
@@ -395,23 +395,24 @@ static void performOp(unsigned int clientVersion,
     }
 
     case wopCollectGarbage: {
-        GCAction action = (GCAction) readInt(from);
-        PathSet pathsToDelete = readStorePaths(from);
-        bool ignoreLiveness = readInt(from);
-
-        PathSet result;
-        unsigned long long bytesFreed;
+        GCOptions options;
+        options.action = (GCOptions::GCAction) readInt(from);
+        options.pathsToDelete = readStorePaths(from);
+        options.ignoreLiveness = readInt(from);
+        options.maxFreed = readLongLong(from);
+        options.maxLinks = readInt(from);
+
+        GCResults results;
         
         startWork();
-        if (ignoreLiveness)
+        if (options.ignoreLiveness)
             throw Error("you are not allowed to ignore liveness");
-        store->collectGarbage(action, pathsToDelete, ignoreLiveness,
-            result, bytesFreed);
+        store->collectGarbage(options, results);
         stopWork();
         
-        writeStringSet(result, to);
-        writeInt(bytesFreed & 0xffffffff, to);
-        writeInt(bytesFreed >> 32, to);
+        writeStringSet(results.paths, to);
+        writeLongLong(results.bytesFreed, to);
+        writeLongLong(results.blocksFreed, to);
         
         break;
     }