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 missing data synchronization #60

Merged
merged 1 commit into from
Jun 21, 2024
Merged

Conversation

HotMercury
Copy link
Collaborator

The get_free_blocks function in simplefs has an issue where data written to the disk is not being properly synchronized.

Testing:
The test flow is as follow. After step 4 the content of test.txt is empty.

  1. mount simplefs
  2. vim test.txt
  3. umount
  4. mount

Change:
Add sync_dirty_buffer to ensure proper disk synchronization.

@jserv jserv changed the title Fix disk write issue Fix unexpected data synchronization Jun 20, 2024
@jserv jserv changed the title Fix unexpected data synchronization Fix missing data synchronization Jun 20, 2024
@jserv
Copy link
Collaborator

jserv commented Jun 20, 2024

Can you improve the test suite to reflect the changes for data synchronization?

@HotMercury
Copy link
Collaborator Author

This means I need to improve my git message or add a test suite for GitHub Actions.

@jserv
Copy link
Collaborator

jserv commented Jun 20, 2024

This means I need to improve my git message or add a test suite for GitHub Actions.

Exactly. That is the reason why we deploy CI pipeline.

bitmap.h Show resolved Hide resolved
Copy link
Collaborator

@jserv jserv left a comment

Choose a reason for hiding this comment

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

Improve the automated tests for checking the data consistency.

script/test.sh Outdated Show resolved Hide resolved
The get_free_blocks function in simplefs has an issue where data
written to the disk is not being properly synchronized.

Testing:
The test flow is as follow. After step 4 the content of test.txt
is empty.
1. mount simplefs
2. vim test.txt
3. umount
4. mount

Changes:
Add sync_dirty_buffer to ensure proper disk synchronization.
Add automated tests for checking the data consistency.
@jserv jserv merged commit e05fa22 into sysprog21:master Jun 21, 2024
2 checks passed
@jserv
Copy link
Collaborator

jserv commented Jun 21, 2024

Thank @HotMercury for contributing!

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.

2 participants