sysprog21 / simplefs

A simple native file system for Linux kernel
Other
362 stars 91 forks source link

Implement mounting and unmounting for external journal device #61

Closed jason50123 closed 2 months ago

jason50123 commented 2 months ago

This pull request continues from https://github.com/sysprog21/simplefs/pull/59#issue-2363416768. Due to some issues with Git, I have addressed them and created this new pull request.

Added a function simplefs_parse_options in the fill super process to obtain the external journal device and configure it using jbd2 related functions. Additionally, journal-related functionality was added to the write functions to record metadata "extent" information.

Also, added a "make journal" command in the Makefile, allowing users to create an external journal device image and mount it to simplefs.

jserv commented 2 months ago

CI pipeline complains the following:

Testing cmd: touch 40919.txt...
Testing cmd: touch 40920.txt...Unmounting filesystem...
Remounting filesystem...
Remount succeeds.
Failed: file_1.txt content is incorrect.
Error: Process completed with exit code 2.
jserv commented 2 months ago

This pull request continues from #59 (comment). Due to some issues with Git, I have addressed them and created this new pull request.

Don't do this. You should simply run git rebase -i and then git push --force. If a workman wishes to do a good job, he must first sharpen his tools.

jason50123 commented 2 months ago

@jserv This version has not yet addressed issues related to Put super. So should I handle this part first and then submit a pull request?

CI pipeline complains the following:


Testing cmd: touch 40919.txt...

Testing cmd: touch 40920.txt...Unmounting filesystem...

Remounting filesystem...

Remount succeeds.

Failed: file_1.txt content is incorrect.

Error: Process completed with exit code 2.
jserv commented 2 months ago

@jserv This version has not yet addressed issues related to Put super. So should I handle this part first and then submit a pull request?

Up to you. You should resolve the issue reported by GitHub Actions in advance. Later, you can create a new commit within the pull request (again, using git rebase -i) or submit a new pull request to consolidate the CI pipeline.

jason50123 commented 2 months ago

@jserv This version has not yet addressed issues related to Put super. So should I handle this part first and then submit a pull request?

Up to you. You should resolve the issue reported by GitHub Actions in advance. Later, you can create a new commit within the pull request (again, using git rebase -i) or submit a new pull request to consolidate the CI pipeline.

I understand, I will take care of it.

jserv commented 2 months ago

Can you provide journal specific test cases?

jason50123 commented 2 months ago

Can you provide journal specific test cases?

@jserv Due to certain issues, unexpected errors occur after journal data during mount-remount operations. Therefore, this commit only addresses the mounting and unmounting of the external journal device. The journaling metadata part will be submitted in a pull request after thorough testing is completed.

jserv commented 2 months ago

Due to certain issues, unexpected errors occur after journal data during mount-remount operations. Therefore, this commit only addresses the mounting and unmounting of the external journal device. The journaling metadata part will be submitted in a pull request after thorough testing is completed.

Then, you should consolidate the git commit message and address the known issue. We do still need some preliminary test cases.

jserv commented 2 months ago

Thank @jason50123 for contributing!