aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/store.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstore/store.hh')
-rw-r--r--src/libstore/store.hh10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/libstore/store.hh b/src/libstore/store.hh
index 2d8018d5f..c617585ba 100644
--- a/src/libstore/store.hh
+++ b/src/libstore/store.hh
@@ -37,8 +37,14 @@ struct Substitute
typedef list<Substitute> Substitutes;
-/* Open the database environment. */
-void openDB();
+/* Open the database environment. If `reserveSpace' is true, make
+ sure that a big empty file exists in /nix/var/nix/db/reserved. If
+ `reserveSpace' is false, delete this file if it exists. The idea
+ is that on normal operation, the file exists; but when we run the
+ garbage collector, it is deleted. This is to ensure that the
+ garbage collector has a small amount of disk space available, which
+ is required to open the Berkeley DB environment. */
+void openDB(bool reserveSpace = true);
/* Create the required database tables. */
void initDB();