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

Add build cfg for FUSE mounting implementation to fuser #1106

Open
wants to merge 10 commits into
base: fuser/fork
Choose a base branch
from

Conversation

dannycjones
Copy link
Contributor

@dannycjones dannycjones commented Nov 6, 2024

Description of change

Our fuser fork emits a lot of warnings during builds, impacting our pull requests. This change addresses the use of undeclared feature flags.

In this change, we replace the feature flags with new cfg field which is just for the fuser mount implementation, having values of pure-rust, libfuse2, and libfuse3. Ideally, Fuser may be able to just determine which libfuse value is available at runtime and not need compile-time flags to distinguish between libfuse2 and libfuse3. For now though, this addresses the immediate issue.

This change is a good candidate to be contributed to upstream (cberner/fuser#311). Once contributed, this commit can be removed.

Relevant issues: N/A

Does this change impact existing behavior?

There should be no change to existing behavior. (We should ensure CI passes for this change.)


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and I agree to the terms of the Developer Certificate of Origin (DCO).

jamesbornholt and others added 7 commits October 28, 2024 14:44
Currently the Filesystem trait forces only a single request dispatch
loop, with the idea that a filesystem that wants to be concurrent can
just spawn its own threads and dispatch operations on them itself. This
works, but it's bad for performance, because it forces every request to
bounce across threads.

Instead, let's make the Filesystem trait use interior mutability. This
allows us to spawn multiple dispatch threads that each block on the FUSE
device, read a request, and immediately dispatch it without the bounce.

Unfortunately there's not a good way for a trait to be variant in
mutability, so this is a breaking API change. We'll need to think more
carefully about how to upstream this change.

Signed-off-by: James Bornholt <[email protected]>
Add `is_forget()` method to `Request`.
Signed-off-by: Alessandro Passaro <[email protected]>
Introduce `Session::run_with_callbacks()` to notify callers before and after kernel
messages are dispatched.

Signed-off-by: Alessandro Passaro <[email protected]>
## Description of change

fuser v0.15.0 added support for creating sessions from FUSE fd. I'm
working on a PR to add this support to Mountpoint. We still need to open
the FUSE device and call `mount` syscall in order to test this new
behavior, and all this logic is already exists with `mnt::Mount`.

We could just copy the logic from `mnt::Mount` - but since we already
have this fork, making this change seemed fine to me. Maybe we can also
consider upstreaming it.

## Does this change impact existing behavior?

No

## Does this change need a changelog entry in any of the crates?

No

---

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license and I agree to the terms of
the [Developer Certificate of Origin
(DCO)](https://developercertificate.org/).

Signed-off-by: Burak Varli <[email protected]>
Copy link
Contributor

@passaro passaro left a comment

Choose a reason for hiding this comment

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

Nice.

## Description of change

Our fuser fork emits a lot of warnings during builds, impacting our pull
requests. This change addresses missing documentation on one struct in
fuser (which was introduced by our change in
awslabs#1098).

This change is a good candidate to be contributed to upstream. Once
contributed, this commit can be removed.

Relevant issues: N/A

## Does this change impact existing behavior?

No.

---

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license and I agree to the terms of
the [Developer Certificate of Origin
(DCO)](https://developercertificate.org/).

---------

Signed-off-by: Daniel Carl Jones <[email protected]>
@dannycjones dannycjones marked this pull request as ready for review November 6, 2024 17:58
@dannycjones
Copy link
Contributor Author

Addressed some changes which would be needed if upstreaming.

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.

4 participants