sysprog21 / simplefs

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

Mount the external journal device and write accessible extent metadata #59

Closed jason50123 closed 2 months ago

jason50123 commented 2 months ago

This pull request currently adds the parse_option in fill super to mount the external journal device to simplefs. It also writes the currently accessible extent metadata to the journal during write operations. The image below demonstrates that it is already possible to mount the external journal device in the v6.8 environment.

螢幕快照 2024-06-20 10-17-03

jserv commented 2 months ago

Avoid uploading screenshots that contain only text. Instead, use Markdown formatting to present command lists, source code, and any text-based content. This approach is more accessible for individuals with visual impairments.

jserv commented 2 months ago

Drop unnecessary pr_info statements.

jserv commented 2 months ago

Fix compatibility with Linux v6.5:

simplefs/super.c: In function ‘simplefs_get_journal_blkdev’:
simplefs/super.c:221:19: error: implicit declaration of function ‘bdev_open_by_dev’; did you mean ‘blkdev_get_by_dev’? [-Werror=implicit-function-declaration]
  221 |     bdev_handle = bdev_open_by_dev(
      |                   ^~~~~~~~~~~~~~~~
      |                   blkdev_get_by_dev
simplefs/super.c:222:48: error: ‘BLK_OPEN_RESTRICT_WRITES’ undeclared (first use in this function)
  222 |         jdev, BLK_OPEN_READ | BLK_OPEN_WRITE | BLK_OPEN_RESTRICT_WRITES, sb,
      |                                                ^~~~~~~~~~~~~~~~~~~~~~~~
jason50123 commented 2 months ago

The latest commit has addressed the mentioned issues. Evidence of the journal functioning correctly will be provided later.

jason50123 commented 2 months ago

@jserv Could you please clarify if you would like me to rebase all the commits into a single commit, or if there is a specific way you prefer me to rework them? Thank you!

jserv commented 2 months ago

@jserv Could you please clarify if you would like me to rebase all the commits into a single commit, or if there is a specific way you prefer me to rework them? Thank you!

There should be only one commit rebasing the latest master branch for reviewing. See https://git-scm.com/docs/git-rebase