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

[#5886] feat (gvfs-fuse): Implement an in-memory file system #5915

Open
wants to merge 50 commits into
base: branch-gvfs-fuse-dev
Choose a base branch
from

Conversation

diqiu50
Copy link
Contributor

@diqiu50 diqiu50 commented Dec 19, 2024

What changes were proposed in this pull request?

Implement an in-memory filesystem for testing and validating the FUSE framework. You need to implement the PathFilesystem trait and support basic file and directory operations:

Why are the changes needed?

Fix: #5886

Does this PR introduce any user-facing change?

No

How was this patch tested?

IT

@diqiu50 diqiu50 self-assigned this Dec 19, 2024
� Conflicts:
�	clients/filesystem-fuse/src/main.rs

� Conflicts:
�	clients/filesystem-fuse/src/filesystem.rs
�	clients/filesystem-fuse/src/main.rs
@diqiu50 diqiu50 requested a review from FANNG1 December 24, 2024 06:38
@FANNG1
Copy link
Contributor

FANNG1 commented Dec 25, 2024

I think it's time to organize the code hierarchy not flatten all the code in the src directory.

// `XXXFileSystem is a filesystem that allows you to implement file access through your own extensions.
let _ = signal::ctrl_c().await;
info!("Received Ctrl+C, Unmounting gvfs...");
gvfs_unmount().await;
Copy link
Contributor

Choose a reason for hiding this comment

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

what will happen if the process crashed without invoking gvfs_unmount?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The mount point does't unmounted, users need to umount the directory manually.

Typical FUSE programs do not run in the foreground, and exiting with Ctrl+C is not the standard practice.
This mode is used for testing and debugging.


let results: Vec<FileStat> = file_map
.iter()
.filter(|x| path_in_dir(path, x.0))
Copy link
Contributor

Choose a reason for hiding this comment

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

please filter out the files in sub directory

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fix

@diqiu50
Copy link
Contributor Author

diqiu50 commented Dec 25, 2024

I think it's time to organize the code hierarchy not flatten all the code in the src directory.

Wait until the subsequent PRs are merged before organizing. Doing the later PRs now would lead to significant conflicts.

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