Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for passing FUSE file descriptors as mount point (#1103)
## Description of change fuser v0.15.0 added support for creating a `Session` from existing FUSE file descriptor (via `Session::from_fd`). This PR adds this support to Mountpoint. It allows passing FUSE file descriptor as mount point in the form of `/dev/fd/{fd}`. An example usage of this feature can be seen with a helper Go script, [mounthelper.go](https://github.com/awslabs/mountpoint-s3/blob/86bdefa5147a7edc533a6be5d2724fec74ba91fb/examples/fuse-fd-mount-point/mounthelper.go): ```bash $ go build mounthelper.go $ sudo /sbin/setcap 'cap_sys_admin=ep' ./mounthelper # `mount` syscall requires `CAP_SYS_ADMIN`, alternatively, `mounthelper` can be run as root $ ./mounthelper -mountpoint /tmp/mountpoint -bucket bucketname bucket bucketname is mounted at /dev/fd/3 2024/11/07 17:23:42 Filesystem mounted, waiting for ctrl+c signal to terminate $ # in a different terminal session $ echo "Hello at `date`" > /tmp/mountpoint/helloworld $ cat /tmp/mountpoint/helloworld Hello at Thu Nov 7 17:32:33 UTC 2024 $ rm /tmp/mountpoint/helloworld $ cat /tmp/mountpoint/helloworld cat: /tmp/mountpoint/helloworld: No such file or directory ``` Relevant issues: This PR resurrects a previous PR to add this feature: #537 ## Does this change impact existing behavior? Shouldn't affect any existing behavior as we had an “is directory?” check for passed mount points before, and it shouldn't have been possible to pass a file descriptor as a mount point prior to this change. ## Does this change need a changelog entry in any of the crates? Updated CHANGELOG for `mountpoint-s3`. --- 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]> Signed-off-by: Burak Varlı <[email protected]> Signed-off-by: Burak Varlı <[email protected]> Signed-off-by: Daniel Carl Jones <[email protected]> Signed-off-by: Daniel Carl Jones <[email protected]> Co-authored-by: Daniel Carl Jones <[email protected]> Co-authored-by: Daniel Carl Jones <[email protected]>
- Loading branch information
602f371
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possible performance regression was detected for benchmark 'Throughput Benchmark (S3 Standard)'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold
2
.sequential_read
326.31943359375
MiB/s1178.14248046875
MiB/s3.61
This comment was automatically generated by workflow using github-action-benchmark.