-
Notifications
You must be signed in to change notification settings - Fork 70
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 a notification mechanism for signaling when the mountpoint is ready #110
Conversation
Is there any reason why this can't be done with squashfuse as well as squashfuse_ll? |
No, I'll add this to squashfuse also. |
4c37e6b
to
4ee02c9
Compare
The code looks pretty good to me now (although the CI checks are running at the moment). Please also add the new option to the |
Added some comments, but overall looks great! |
4ee02c9
to
98ec24a
Compare
Thanks, @vasi. I've addressed your comments, updated the |
The new new smoke test unfortunately failed on the freebsd check. Look for
|
Thanks, I was looking for this log but couldn't find it. So it's probably fine to overmount squashfuse on top of an existing squashfuse mountpoint on freebsd, I need to change the test to make it fail the mount in other ways. |
Add the notify_pipe option which allows the user to specify the path to a named pipe. When the mountpoint is ready, a message will be written to this pipe: 's' for success and 'f' for failure. To avoid blocking the fuse process until the pipe is read, a new process is spawned which performs a blocking operation on the pipe. In case of mount failure, no additional process is created and the main process blocks until the pipe is read. An example of operation is provided below: ``` set -x FIFO=$(mktemp -u) mkfifo "$FIFO" ./squashfuse_ll -o notify_pipe="$FIFO" -f /path/to/squashfs/archive /tmp/squash& STATUS=$(head -c1 "$FIFO") if [ "$STATUS" = "s" ]; then echo "Mountpoint contains:" ls /tmp/squash else echo "Mounting squashfuse on /tmp/squash failed" fi ``` Fixes vasi#49
98ec24a
to
2071962
Compare
I'm still awaiting approval for one workflow. |
Thanks for the reminder, I'm sorry I didn't notice the push. The good news was that freebsd passed. I now approved the workflow. |
This isn't fully working, see #112 |
Add the notify_pipe option which allows the user to specify the path to a named pipe. When the mountpoint is ready, a message will be written to this pipe: 's' for success and 'f' for failure. To avoid blocking the fuse process until the pipe is read, a new process is spawned which performs a blocking operation on the pipe. In case of mount failure, no additional process is created and the main process blocks until the pipe is read.
An example of operation is provided below:
Fixes #49