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

Merged
merged 50 commits into from
Dec 25, 2024
Merged
Changes from 1 commit
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
f025216
Add SimpleFilesystem
diqiu50 Dec 17, 2024
97e066d
Update
diqiu50 Dec 17, 2024
d0b6958
Add uts
diqiu50 Dec 17, 2024
3769400
Fix test error
diqiu50 Dec 17, 2024
3ecb980
Update comments
diqiu50 Dec 17, 2024
4fe58f2
Fix ci error
diqiu50 Dec 17, 2024
a55bff8
Add description of gvfs-fuse filesystem struct
diqiu50 Dec 18, 2024
58922e1
Update
diqiu50 Dec 18, 2024
cda8275
Update
diqiu50 Dec 18, 2024
5f93717
Update
diqiu50 Dec 18, 2024
39e55fe
Update for review
diqiu50 Dec 18, 2024
366c77a
Update
diqiu50 Dec 18, 2024
33dc3bd
Update
diqiu50 Dec 18, 2024
865f213
Update
diqiu50 Dec 18, 2024
2570eb8
Update
diqiu50 Dec 18, 2024
bfd3945
Update
diqiu50 Dec 19, 2024
4fb77e1
Update
diqiu50 Dec 19, 2024
8cf0c4a
Update
diqiu50 Dec 19, 2024
21b080d
Update
diqiu50 Dec 19, 2024
4fe5fe3
Update
diqiu50 Dec 19, 2024
2517afa
Update
diqiu50 Dec 19, 2024
d32cd6a
Add
diqiu50 Dec 19, 2024
53e4c4e
remove unused mod
diqiu50 Dec 19, 2024
568fefe
Update
diqiu50 Dec 20, 2024
76305a9
Update
diqiu50 Dec 20, 2024
5459622
Update path interface
diqiu50 Dec 20, 2024
1ea53ef
Merge branch 'gvfs-pr2' into gvfs-pr3
diqiu50 Dec 20, 2024
dbca557
Fix error
diqiu50 Dec 20, 2024
d444ad3
Fix
diqiu50 Dec 20, 2024
2570f54
Update
diqiu50 Dec 23, 2024
f6ce011
Update
diqiu50 Dec 23, 2024
8fb13bb
Update
diqiu50 Dec 23, 2024
e23a589
Update
diqiu50 Dec 23, 2024
e8c74f6
Update
diqiu50 Dec 23, 2024
b99af10
Update
diqiu50 Dec 24, 2024
4dd5bf4
Update
diqiu50 Dec 24, 2024
01d90a6
Update
diqiu50 Dec 24, 2024
14609cf
Update
diqiu50 Dec 24, 2024
127cb41
Update
diqiu50 Dec 24, 2024
df48db4
Update
diqiu50 Dec 24, 2024
37a46d6
Update
diqiu50 Dec 24, 2024
2bd05da
Merge branch 'gvfs-pr2' into gvfs-pr3
diqiu50 Dec 24, 2024
364ce34
Merge remote-tracking branch 'gt/branch-gvfs-fuse-dev' into gvfs-pr3
diqiu50 Dec 24, 2024
3a863ed
Update
diqiu50 Dec 24, 2024
406641b
Update
diqiu50 Dec 24, 2024
0e512fc
Update
diqiu50 Dec 24, 2024
da02b01
Add testers
diqiu50 Dec 24, 2024
c043b95
Fix test
diqiu50 Dec 24, 2024
d4da504
Add testers
diqiu50 Dec 24, 2024
7bdd166
Fix list_dir can list file in the subdir
diqiu50 Dec 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update
diqiu50 committed Dec 24, 2024
commit 127cb41fd408e2cf1cafca381f454229ebc63185
14 changes: 6 additions & 8 deletions clients/filesystem-fuse/src/default_raw_filesystem.rs
Original file line number Diff line number Diff line change
@@ -205,26 +205,24 @@ impl<T: PathFileSystem> RawFileSystem for DefaultRawFileSystem<T> {

async fn create_file(&self, parent_file_id: u64, name: &str, flags: u32) -> Result<FileHandle> {
let parent_file_entry = self.get_file_entry(parent_file_id).await?;
let mut opened_file_with_out_file_handle_id = self
let mut file_with_out_id = self
.fs
.create_file(&parent_file_entry.path, name, OpenFileFlags(flags))
.await?;

opened_file_with_out_file_handle_id.set_file_id(parent_file_id, self.next_file_id());
file_with_out_id.set_file_id(parent_file_id, self.next_file_id());

// insert the new file to file entry manager
self.insert_file_entry_locked(
parent_file_id,
opened_file_with_out_file_handle_id.file_stat.file_id,
&opened_file_with_out_file_handle_id.file_stat.path,
file_with_out_id.file_stat.file_id,
&file_with_out_id.file_stat.path,
)
.await;

// put the openfile to the opened file manager and allocate a file handle id
let opened_file_with_file_handle_id = self
.opened_file_manager
.put(opened_file_with_out_file_handle_id);
let opened_file_with_file_handle_id = opened_file_with_file_handle_id.lock().await;
let file_with_id = self.opened_file_manager.put(file_with_out_id);
let opened_file_with_file_handle_id = file_with_id.lock().await;
Ok(opened_file_with_file_handle_id.file_handle())
}