Support inline data in files

This commit is contained in:
Jeremy Soller
2025-09-26 14:17:03 -06:00
parent 5c54b189f9
commit 437d06ab8c
3 changed files with 83 additions and 10 deletions
+10 -2
View File
@@ -181,8 +181,8 @@ pub struct Node {
/// Padding
pub padding: [u8; BLOCK_SIZE as usize - 4042],
/// Level data, kept private so inline data can be supported
level_data: NodeLevelData,
/// Level data, should not be used directly so inline data can be supported
pub(crate) level_data: NodeLevelData,
}
unsafe impl BlockTrait for Node {
@@ -253,6 +253,14 @@ impl Node {
0
}
.into(),
flags: if mode & Self::MODE_TYPE == Self::MODE_DIR {
// Directories must not use inline data (until h-tree supports it)
NodeFlags::empty()
} else {
NodeFlags::INLINE_DATA
}
.bits()
.into(),
..Default::default()
}
}