-
Notifications
You must be signed in to change notification settings - Fork 69
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
fusedev: add clone_fuse_file
method to FuseSession
#177
Conversation
clone_fuse_file
method to FuseSession
clone_fuse_file
method to FuseSession
I try to use the following code to test this feature: let dir = TempDir::new().unwrap();
let se = FuseSession::new(dir.as_path(), "foo", "bar", true);
assert!(se.is_ok());
let mut se = se.unwrap();
se.mount().unwrap(); but get CI error:
Should I config the /etc/fuse.conf by modify the ci configuration files? |
@loheagn Could you explain a bit why you need it? |
As the comment discussed, clone fuse file can avoid blocking the IO requests when restarting nydusd. |
|
||
#[test] | ||
fn test_clone_fuse_file() { | ||
let dir = TempDir::new().unwrap(); |
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.
let mut se = FuseSession::new(dir.as_path(), "foo", "bar", true).unwrap();
?
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.
fixed
We should do that:) |
This patch adds `clone_fuse_file` method to `FuseSession`. This function obtains a new file descriptor by opening `/dev/fuse` and associates the file descriptor with the original fuse connection of fuse session using the ioctl `FUSE_DEV_IOC_CLONE` command. Signed-off-by: Nan Li <[email protected]>
cbbf971
to
2f42d66
Compare
@jiangliu Should I fix this in this patch? |
Please fix it:) |
2f42d66
to
3859ed0
Compare
Signed-off-by: Nan Li <[email protected]>
3859ed0
to
4e44044
Compare
This patch adds
clone_fuse_file
method toFuseSession
.This function obtains a new file descriptor by opening
/dev/fuse
and associates the file descriptor with the original fuse connection of fuse session using the ioctlFUSE_DEV_IOC_CLONE
command.