-
Notifications
You must be signed in to change notification settings - Fork 154
Remove flag and padding in rename operation when using libfuse #342
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
base: master
Are you sure you want to change the base?
Conversation
cberner
left a comment
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.
This seems like the wrong fix to me. Linux is the only supported OS with not(libfuse), so this config can never be reached on MacOS. Should we just revert that flags field?
|
Maybe we just need to remove that line from Line 23 in a760aae
|
|
I see. I was assuming that at some point in the future, supporting Mac without libfuse could be an option. Regarding @FirelightFlagboy proposal, I think removing the fields would be the simplest solution. If Mac without libfuse is not an option, those fields are never going to be used. We can probably just get read off the fields and the Another option, which seems a lot more complicated but could be useful if you expect, at some point in time, having a pure Rust implementation for Mac, could be the following: Since:
@cberner your call. They are all fine for me, my only objective here is just to get the rename operation working on Mac. |
|
It still surprising, because macFuse still define those fields: https://github.com/osxfuse/fuse/blob/2f5d04ada43b42bde3c0ce49c5a5d977bce2b0f2/include/fuse_kernel.h#L446-L452 |
|
@FirelightFlagboy I think they are compensating for it here |
|
@nicolaspapp what MacFuse version are you using? It looks like the current code was to fix an issue with MacFuse >=4.0 (#307). However, now that I'm looking at build.rs I think the problem might be this line: Line 17 in 9f6ced7
macfuse-4-compat feature for MacFuse >= 2.6, which seems like it will break for 2.6 <= x < 4.0
|
|
I am using the latest. Version 5.0.1. I believe it might be related to to what happens on fuse_lowlevel.c:1304
|
|
Oh interesting, do we just need to add that FUSE_CAP_RENAME_SWAP check then? |
|
@cberner yes, apparently they are using that flag to determine wether flags and padding should be read. |
|
I've tested a simple rename with your branch and it work in the shell, but I know it's simpler with the shell than in finder, did test renaming a file with finder.app? Macfuse: 4.10.1 |
|
@FirelightFlagboy under what situations was this initially breaking? Because what I have so far in the branch is basically reverting #307. Based on what I see on the actual code |
The problem + investigation is detailed in the first comment: #307 (comment)
Maybe |
|
@FirelightFlagboy I found something... This is what I got so far:
I believe the first one was introduced at macFUSE 4.0.0. The second one seems to match 4.0.3 release description: I think it might have been the default at some point, but ultimately what defines the FUSE_CAP_RENAME_SWAP is whether the I'm not sure why you were still seeing this issue in 4.8 |
…didn't comply with linux standard
In the man 2 for mknod:
EPERM [...] also returned if the filesystem containing pathname does not support the
type of node requested.
|
i confirm i need this PR to fix an issue i get with rename implementation in fuser : the file name being passed is corrupted (first characters being dropped) |


No description provided.