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

fuse: initialize marfs config before mounting fuse #230

Merged
merged 1 commit into from
Aug 22, 2023

Conversation

bertschinger
Copy link
Contributor

This commit changes the initialization of the marfs fuse context to occur before calling fuse_main(). The reason for this is to exit the fuse process before mounting the fuse filesystem when there are fatal errors. Once fuse_main() is called, exiting the daemon process leaves fuse mounted, causing ENOTCONN errors when accessing the mountpoint. However, if there are fatal errors in the configuration, there is no reason to even mount fuse at all.

This commit also changes the errors in marfs_fuse_init() to output to stderr instead of using the LOG macro. This works because now the function always runs in the foreground so sending output to stderr works, and these errors should always be printed even if the binary is not compiled with logging enabled.

This commit changes the initialization of the marfs fuse
context to occur before calling fuse_main(). The reason for this
is to exit the fuse process before mounting the fuse filesystem
when there are fatal errors. Once fuse_main() is called, exiting
the daemon process leaves fuse mounted, causing ENOTCONN errors
when accessing the mountpoint. However, if there are fatal errors
in the configuration, there is no reason to even mount fuse at all.

This commit also changes the errors in marfs_fuse_init() to output
to stderr instead of using the LOG macro. This works because now
the function always runs in the foreground so sending output to
stderr works, and these errors should always be printed even if the
binary is not compiled with logging enabled.
@gransom gransom merged commit 5aa0c30 into mar-file-system:master Aug 22, 2023
@bertschinger bertschinger deleted the fuse_init branch August 22, 2023 21:18
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