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 utilisation #637

Merged
merged 1 commit into from
Jun 6, 2024
Merged

Fix block bitmap utilisation #637

merged 1 commit into from
Jun 6, 2024

Conversation

vinc
Copy link
Owner

@vinc vinc commented Jun 6, 2024

I found another issue after fixing #636. We were using only 1/8 of every block bitmap to mark allocated blocks resulting in an exception when trying to use more than one eight of the disk:

~
> dhcp
[23.345445] NET IP 10.0.2.15/24
[23.348445] NET GW 10.0.2.2
[23.352444] NET DNS 10.0.2.3

~
> dsk u -b
size: 8.0M
used: 108K
free: 7.9M

~
> time http 10.0.2.2:8000/1000kb.txt => 1
Executed 'http 10.0.2.2:8000/1000kb.txt' in 14.685895s

~
> dsk u -b
size: 8.0M
used: 1.1M
free: 6.9M

~
> time http 10.0.2.2:8000/1000kb.txt => 2
DEBUG: panicked at src/sys/fs/bitmap_block.rs:25:13:
index out of bounds: the len is 512 but the index is 512
qemu-system-x86_64: terminating on signal 2

@vinc
Copy link
Owner Author

vinc commented Jun 6, 2024

And now there's another issue around half of the disk:

~
> time http 10.0.2.2:8000/1000kb.txt => 3
Executed 'http 10.0.2.2:8000/1000kb.txt' in 14.993001s

~
> dsk u -b
size: 8.0M
used: 3.1M
free: 4.9M

~
> time http 10.0.2.2:8000/1000kb.txt => 4
DEBUG: panicked at src/sys/fs/block_device.rs:69:43:
index out of bounds: the len is 16360 but the index is 4294967295

@vinc vinc marked this pull request as ready for review June 6, 2024 16:41
@vinc vinc merged commit 73ba882 into trunk Jun 6, 2024
1 check passed
@vinc vinc deleted the fix/block-bitmap branch June 6, 2024 16:41
@vinc vinc mentioned this pull request Jun 18, 2024
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.

1 participant