Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions crates/composefs/src/erofs/reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -546,12 +546,14 @@ impl<ObjectID: FsVerityHashValue> ObjectCollector<ObjectID> {
}

if inode.mode().is_dir() {
if !inode.inline().is_empty() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you have a reason to change the traversal ordering too so the tail block is traversed first?

let inline_block = DirectoryBlock::ref_from_bytes(inode.inline()).unwrap();
self.visit_directory_block(inline_block);
}

for blkid in inode.blocks(img.sb.blkszbits) {
self.visit_directory_block(img.directory_block(blkid));
}

let tail = DirectoryBlock::ref_from_bytes(inode.inline()).unwrap();
self.visit_directory_block(tail);
}

Ok(())
Expand Down
Loading