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 ext2 read and write #59

Merged
merged 5 commits into from
Mar 11, 2024
Merged

Conversation

Galfurian
Copy link
Member

  • Improve ext2_dump_inode output;
  • Rename EXT2_INDIRECT_BLOCKS to EXT2_DIRECT_BLOCKS;
  • Simplify and fix ext2_get_real_block_index;
  • Simplify and fix ext2_read_inode_data;
  • Remove indirect_blocks_index, doubly_indirect_blocks_index, and trebly_indirect_blocks_index from the fs structure;
  • Simplify and fix ext2_set_real_block_index, we were not saving the block in ext2_set_real_block_index;
  • Create a stress test for big files;
  • Fix ext2_write_inode_data;
  • Add more comments to ext2_allocate_block;
  • Add more logging messages where needed;

- Rename EXT2_INDIRECT_BLOCKS to EXT2_DIRECT_BLOCKS
- Simplify and fix ext2_get_real_block_index
- Simplify and fix ext2_read_inode_data
- Remove indirect_blocks_index, doubly_indirect_blocks_index, and trebly_indirect_blocks_index from the fs structure
- We were not saving the block in ext2_set_real_block_index, now we do
- Add more comments to ext2_allocate_block;
- Fix error return for ext2_read_inode_data;
- Add more logging message where needed;
@Galfurian Galfurian merged commit 2390afb into mentos-team:develop Mar 11, 2024
18 checks passed
@@ -817,7 +832,7 @@ static inline int ext2_find_free_block_in_group(ext2_filesystem_t *fs, uint8_t *
/// @param fs the ext2 filesystem structure.
/// @param cache the cache from which we read the bgdt data.
/// @param linear_index the output variable where we store the linear indes to the free block.
/// @return 1 if we found a free block, 0 otherwise.
/// @return 1 if we found a free block abd chace contains the block_bitmap, 0 otherwise.
Copy link
Contributor

Choose a reason for hiding this comment

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

This is probably a typo.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep, thanks!

"t_groups",
"t_itimer",
"t_kill",
// "t_abort",
Copy link
Contributor

Choose a reason for hiding this comment

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

Why disabling all tests?

Copy link
Member Author

Choose a reason for hiding this comment

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

Sorry, my bad, I was disabling them to focus on write/read from file.

@Galfurian Galfurian added the bug Something isn't working label Apr 5, 2024
@Galfurian Galfurian deleted the fix-ext2-read branch August 22, 2024 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants