about summary refs log tree commit diff
path: root/src/libstore/local-store.hh
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-05-15T09·18+0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-05-15T09·18+0200
commita1b66f316e980b4b7e755de47604bdc30371b67e (patch)
treece5fbce5dc61ab47dc67e3d475f93ea8fe61ad74 /src/libstore/local-store.hh
parente384e7b387c4745f30032ef431a06aa26cee73a5 (diff)
parent3b9ea8452f102595874826e349fa38f85c00aa39 (diff)
Merge branch 'master' of github.com:wmertens/nix
Diffstat (limited to 'src/libstore/local-store.hh')
-rw-r--r--src/libstore/local-store.hh15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/libstore/local-store.hh b/src/libstore/local-store.hh
index 09639e74cf4c..487bb711ea5e 100644
--- a/src/libstore/local-store.hh
+++ b/src/libstore/local-store.hh
@@ -6,6 +6,11 @@
 #include "util.hh"
 #include "pathlocks.hh"
 
+#if HAVE_TR1_UNORDERED_SET
+#include <tr1/unordered_set>
+#endif
+
+
 
 class sqlite3;
 class sqlite3_stmt;
@@ -303,7 +308,15 @@ private:
 
     void checkDerivationOutputs(const Path & drvPath, const Derivation & drv);
 
-    void optimisePath_(OptimiseStats & stats, const Path & path);
+#if HAVE_TR1_UNORDERED_SET
+    typedef std::tr1::unordered_set<ino_t> InodeHash;
+#else
+    typedef std::set<ino_t> InodeHash;
+#endif
+
+    InodeHash loadInodeHash();
+    Strings readDirectoryIgnoringInodes(const Path & path, const InodeHash & inodeHash, OptimiseStats & stats);
+    void optimisePath_(OptimiseStats & stats, const Path & path, InodeHash & inodeHash);
 
     // Internal versions that are not wrapped in retry_sqlite.
     bool isValidPath_(const Path & path);