Commit b4df131a authored by Jeremy Soller's avatar Jeremy Soller

Fix disk usage calculation

parent b32a421b
Pipeline #3040 failed with stages
in 1 minute and 8 seconds
......@@ -38,7 +38,8 @@ fn node_attr(node: &(u64, Node)) -> FileAttr {
FileAttr {
ino: node.0,
size: node.1.extents[0].length,
blocks: (node.1.extents[0].length + BLOCK_SIZE - 1)/BLOCK_SIZE,
// Blocks is in 512 byte blocks, not in our block size
blocks: (node.1.extents[0].length + BLOCK_SIZE - 1)/BLOCK_SIZE * (BLOCK_SIZE / 512),
atime: NULL_TIME,
mtime: Timespec {
sec: node.1.mtime as i64,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment