about summary refs log tree commit diff
path: root/tvix/store/src/fs/inodes.rs
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2023-11-07T19·54+0200
committerclbot <clbot@tvl.fyi>2023-11-07T20·19+0000
commit9cd2e920653914d4ef7bec525614d101f3fdd207 (patch)
treeb5909be1ad3938479176667cbfc1099cfa27c5d2 /tvix/store/src/fs/inodes.rs
parenta778b855d21f5b33396a8a3e4fef724bd84fb956 (diff)
refactor(tvix/store/fs): mv sparse -> populated directories r/6978
Do this upgrade whenever someone is actually interested in the children
of a directory, but that directory doesn't contain a more detailed
listing. This is much more predictable, and removes a bunch of confusing
code from the inode tracker itself.

Change-Id: Ib3a13694d6d5d22887d2d04ae429592137f39cb4
Reviewed-on: https://cl.tvl.fyi/c/depot/+/9982
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: Connor Brewster <cbrewster@hey.com>
Diffstat (limited to 'tvix/store/src/fs/inodes.rs')
-rw-r--r--tvix/store/src/fs/inodes.rs13
1 files changed, 0 insertions, 13 deletions
diff --git a/tvix/store/src/fs/inodes.rs b/tvix/store/src/fs/inodes.rs
index ed75a1bc78..4047199982 100644
--- a/tvix/store/src/fs/inodes.rs
+++ b/tvix/store/src/fs/inodes.rs
@@ -55,16 +55,3 @@ impl From<&castorepb::DirectoryNode> for InodeData {
         ))
     }
 }
-
-/// converts a proto::Directory to a InodeData::Directory(DirectoryInodeData::Populated(..)).
-/// The inodes for each child are 0, because it's up to the InodeTracker to allocate them.
-impl From<castorepb::Directory> for InodeData {
-    fn from(value: castorepb::Directory) -> Self {
-        let digest = value.digest();
-
-        let children: Vec<(u64, castorepb::node::Node)> =
-            value.nodes().map(|node| (0, node)).collect();
-
-        InodeData::Directory(DirectoryInodeData::Populated(digest, children))
-    }
-}