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

Xattrs support in reverse mode #878

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Ratio2
Copy link

@Ratio2 Ratio2 commented Nov 18, 2024

Fixes #827

@rfjakob
Copy link
Owner

rfjakob commented Nov 18, 2024

Nice! Can you enable the test in https://github.com/rfjakob/gocryptfs/blob/master/tests/reverse/xattr_test.go ?

@Ratio2
Copy link
Author

Ratio2 commented Nov 18, 2024

Nice! Can you enable the test in https://github.com/rfjakob/gocryptfs/blob/master/tests/reverse/xattr_test.go ?

Done. I'm not sure if a notification is sent to the email when updating the sources.

Comment on lines -71 to -74
// Caller passes size zero to find out how large their buffer should be
if len(dest) == 0 {
return uint32(len(data)), 0
}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why remove this?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The behavior of the function is described in:
https://github.com/hanwen/go-fuse/blob/756578b6a0b03511fde147b2f23c5b97217ede27/fs/api.go#L312
It doesn't make sense, since the following condition will give the same result:
https://github.com/hanwen/go-fuse/blob/756578b6a0b03511fde147b2f23c5b97217ede27/fuse/opcode.go#L285

@@ -50,13 +47,13 @@ func (n *Node) Getxattr(ctx context.Context, attr string, dest []byte) (uint32,
var errno syscall.Errno
data, errno = n.getXAttr(attr)
if errno != 0 {
return minus1, errno
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Successfully merging this pull request may close these issues.

xattrs support missing from reverse mode
2 participants