-
Notifications
You must be signed in to change notification settings - Fork 997
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
fuse,meta: support GETFLAGS/SETFLAGS ioctl #2346
Conversation
close #775 Hi, I have a init implement for support ioctl. It's not complete and I hope your help, see if this is the right direction |
Codecov Report
@@ Coverage Diff @@
## main #2346 +/- ##
==========================================
- Coverage 59.69% 59.68% -0.02%
==========================================
Files 138 138
Lines 23341 23481 +140
==========================================
+ Hits 13933 14014 +81
- Misses 7596 7643 +47
- Partials 1812 1824 +12
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
@qingyunha This looks pretty good, some details could be tuned. |
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.
doMknod
should check parent dir's flags.
if (pattr.Flags & FlagImmutable) != 0 {
return syscall.EPERM
}
|
@qingyunha Do you have time to continue this PR? If not, we can take is over. |
Sorry for the delay. I still want to try to implement this feature, perhaps this weekend. |
Sure |
Updated. |
func (fs *fileSystem) Ioctl(cancel <-chan struct{}, in *fuse.IoctlIn, out *fuse.IoctlOut, bufIn, bufOut []byte) (status fuse.Status) { | ||
ctx := newContext(cancel, &in.InHeader) | ||
defer releaseContext(ctx) | ||
out.Result = int32(fs.v.Ioctl(ctx, Ino(in.NodeId), in.Cmd, in.Arg, bufIn, bufOut)) |
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.
out.Result = int32(fs.v.Ioctl(ctx, Ino(in.NodeId), in.Cmd, in.Arg, bufIn, bufOut)) | |
return fuse.Status(fs.v.Ioctl(ctx, Ino(in.NodeId), in.Cmd, in.Arg, bufIn, bufOut)) |
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.
I think the ioctl
result should be set to out.Result. The return error will be the fuse protocol level error.
@qingyunha Please rebase the PR and resolve the conflicts. |
Failed test:
|
Done. |
This reverts commit 4744b0f.
This reverts commit 4744b0f.
No description provided.