Skip to content

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.

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.

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
@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