Skip to content
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

Xattr+Winfsp: Wrong return code if underlying FS does not support extended attributes #86

Closed
infeo opened this issue Nov 21, 2023 · 2 comments
Labels

Comments

@infeo
Copy link
Member

infeo commented Nov 21, 2023

Fuse-nio-adapter version: 4.0.0-beta4

With commit 5ce3f13 fuse-nio-adapter supports extended attributes. But since backend filesystem also needs to support extended attributes by implementing the UserDefinedFileAttributeView.

In the adapter, we check if this is implemented with

if (xattr == null) {
return -errno.enotsup();
}

So far so good. Unfortunately, ENOTSUP error code is mapped in WinFSP to the NTSTATUS code STATUS_ACCESS_DENIED, leading to unexpected results. The reason is, that winfsp uses the function fsp_fuse_ntstatus_from_errno to map POSIX errors to Windows NTSTATUSes. The actual mapping is defined in errno.i and if none is found, by default ACCESS_DENIED is returned, which is here the case. (The actual value of ENOTSUP is defined in the Windows version of errno.h)

@infeo
Copy link
Member Author

infeo commented Nov 21, 2023

Actual fix depends on winfsp/winfsp#531.

For now, xattr support will be deactivated in the Winfsp mounters.

infeo added a commit that referenced this issue Nov 21, 2023
infeo added a commit that referenced this issue Nov 21, 2023
infeo added a commit that referenced this issue Nov 21, 2023
@infeo
Copy link
Member Author

infeo commented Nov 24, 2023

Closed with e53e100

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant