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

[#5734] feat (gvfs-fuse): Gvfs-fuse basic FUSE-level implementation and code structure layout #5835

Merged
merged 12 commits into from
Dec 16, 2024

Conversation

diqiu50
Copy link
Contributor

@diqiu50 diqiu50 commented Dec 11, 2024

What changes were proposed in this pull request?

  1. Implement basic FUSE interfaces.
  2. Implement filesystem trait and relation structures.

Why are the changes needed?

Fix: #5734

Does this PR introduce any user-facing change?

No

How was this patch tested?

No

@diqiu50 diqiu50 self-assigned this Dec 11, 2024
@diqiu50 diqiu50 requested a review from FANNG1 December 11, 2024 08:11
/// the `file_id` and `parent_file_id` it is the unique identifier for the file system, it is used to identify the file or directory
/// the `fh` it is the file handle, it is used to identify the opened file, it is used to read or write the file content
#[async_trait]
pub(crate) trait RawFileSystem: Send + Sync {
Copy link
Contributor

Choose a reason for hiding this comment

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

The name of RawFileSystem is confusing, could you provide better name?

Copy link
Contributor Author

@diqiu50 diqiu50 Dec 12, 2024

Choose a reason for hiding this comment

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

I think the name is OK, Could you have a good suggestion.

})
}

async fn destroy(&self, _req: Request) {}
Copy link
Contributor

Choose a reason for hiding this comment

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

why not release the resource in local_fs here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's not implemented yet.

@FANNG1
Copy link
Contributor

FANNG1 commented Dec 11, 2024

How do you pass user information to Gravitino?

@diqiu50
Copy link
Contributor Author

diqiu50 commented Dec 12, 2024

How do you pass user information to Gravitino?

This pr is not touch Gravitino, we need consider later

@diqiu50 diqiu50 requested a review from FANNG1 December 12, 2024 02:39
@diqiu50 diqiu50 force-pushed the gvfs-pr1 branch 3 times, most recently from f59eb23 to 515a2d8 Compare December 12, 2024 06:27
pub(crate) ctime: Timestamp,

// file link count
pub(crate) nlink: u32,
Copy link
Contributor

Choose a reason for hiding this comment

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

do we need nlink?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's a reference count of the file. we may use it later.

Copy link
Contributor

Choose a reason for hiding this comment

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

Could you provide an example about how to use it ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This can be considered in a later PR. Let's first push the framework so others can join in.

@FANNG1
Copy link
Contributor

FANNG1 commented Dec 13, 2024

LGTM, except minor comments

@diqiu50 diqiu50 requested a review from FANNG1 December 13, 2024 07:50
@diqiu50 diqiu50 force-pushed the gvfs-pr1 branch 2 times, most recently from d15fd9d to 96d442c Compare December 13, 2024 08:00
@diqiu50 diqiu50 force-pushed the gvfs-pr1 branch 2 times, most recently from 83436a4 to a423492 Compare December 13, 2024 08:05
async fn create_file(&self, parent_file_id: u64, name: &str, flags: u32) -> Result<FileHandle>;

/// Create the directory by parent file id and file name
/// Create the directory by parent file id and file name, if successful, return the file id
Copy link
Contributor

Choose a reason for hiding this comment

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

How about defining a new type FileID not using u64 directly here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

use u64 is ok. It shouldn't be necessary.

@FANNG1 FANNG1 merged commit b238873 into apache:branch-gvfs-fuse-dev Dec 16, 2024
28 checks passed
@FANNG1 FANNG1 added the 0.8.0 Release v0.8.0 label Dec 16, 2024
diqiu50 added a commit to diqiu50/gravitino that referenced this pull request Jan 3, 2025
…tion and code structure layout (apache#5835)

### What changes were proposed in this pull request?

1. Implement basic FUSE interfaces.
2. Implement filesystem trait and relation structures.


### Why are the changes needed?

Fix: apache#5734

### Does this PR introduce _any_ user-facing change?

No

### How was this patch tested?

No
diqiu50 added a commit to diqiu50/gravitino that referenced this pull request Jan 3, 2025
…tion and code structure layout (apache#5835)

### What changes were proposed in this pull request?

1. Implement basic FUSE interfaces.
2. Implement filesystem trait and relation structures.


### Why are the changes needed?

Fix: apache#5734

### Does this PR introduce _any_ user-facing change?

No

### How was this patch tested?

No
jerryshao pushed a commit that referenced this pull request Jan 3, 2025
…nd code structure layout (#5835)

### What changes were proposed in this pull request?

1. Implement basic FUSE interfaces.
2. Implement filesystem trait and relation structures.


### Why are the changes needed?

Fix: #5734

### Does this PR introduce _any_ user-facing change?

No

### How was this patch tested?

No
Abyss-lord pushed a commit to Abyss-lord/gravitino that referenced this pull request Jan 4, 2025
…tion and code structure layout (apache#5835)

### What changes were proposed in this pull request?

1. Implement basic FUSE interfaces.
2. Implement filesystem trait and relation structures.


### Why are the changes needed?

Fix: apache#5734

### Does this PR introduce _any_ user-facing change?

No

### How was this patch tested?

No
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.8.0 Release v0.8.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants