Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix block bitmap area calculation #638

Draft
wants to merge 7 commits into
base: trunk
Choose a base branch
from
Draft

Conversation

vinc
Copy link
Owner

@vinc vinc commented Jun 6, 2024

The formula used to calculate the size of the block bitmap area was not correct, resulting in blocks that cannot be allocated. This issue surfaced after #637 when using about half of the disk.

One thing to note is that this PR will likely extend the size of the block bitmap area by one or more blocks so we must increase the version number of MFS to use the old formula on existing disks.

@vinc
Copy link
Owner Author

vinc commented Jun 6, 2024

This PR also fixes out of space errors when we used the whole disk.

@vinc
Copy link
Owner Author

vinc commented Jun 6, 2024

And now when we are out of disk we get the correct numbers:

~
> disk usage
size: 8376320
used: 8376320
free:       0

The system doesn't crash, there's just no writes to disk possible.

@vinc
Copy link
Owner Author

vinc commented Jun 6, 2024

To test the disk I generated a number of files with precise sizes on the host like this 100 KB file:

$ dd if=/dev/zero of=100 bs=1024 count=100

Then I launched a HTTP server in the dir on the host:

$ python -m http.server

And I downloaded the file from MOROS:

> time http 10.0.2.2:8000/100 => 1

@vinc
Copy link
Owner Author

vinc commented Jun 7, 2024

disk-4

@vinc
Copy link
Owner Author

vinc commented Jun 16, 2024

This is a breaking change that is very close to the summer solstice release date of MOROS so we'll merge it after the release to have 3 months to test it before the next.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant