-
Notifications
You must be signed in to change notification settings - Fork 472
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
feat(bin/ofs): privileged mount #4507
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -77,12 +77,20 @@ async fn execute_inner(args: Args) -> Result<()> { | |
mount_option.uid(uid.into()); | ||
mount_option.gid(gid.into()); | ||
mount_option.no_open_dir_support(true); | ||
mount_option.read_only(true); | ||
|
||
let adapter = fuse::Fuse::new(args.backend, uid.into(), gid.into()); | ||
|
||
let mut mount_handle = Session::new(mount_option) | ||
.mount_with_unprivileged(adapter, args.mount_path) | ||
.await?; | ||
let session = Session::new(mount_option); | ||
|
||
let mut mount_handle = if uid.is_root() { | ||
session.mount(adapter, args.mount_path).await? | ||
} else { | ||
log::warn!("unprivileged mount may not detect external unmount, tracking issue: https://github.com/Sherlock-Holo/fuse3/issues/72"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we have resolved it in #4393 ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No we not |
||
session | ||
.mount_with_unprivileged(adapter, args.mount_path) | ||
.await? | ||
}; | ||
|
||
let handle = &mut mount_handle; | ||
|
||
|
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.
Please don't link to external issues directly. Create an issue in opendal and add this link as references.