Skip to content

Xattrs support in reverse mode#878

Closed
Ratio2 wants to merge 1 commit intorfjakob:masterfrom
Ratio2:reverse-xattrs
Closed

Xattrs support in reverse mode#878
Ratio2 wants to merge 1 commit intorfjakob:masterfrom
Ratio2:reverse-xattrs

Conversation

@Ratio2
Copy link
Contributor

@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
Contributor 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
Contributor 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

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
Contributor Author

Choose a reason for hiding this comment

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

@rfjakob
Copy link
Owner

rfjakob commented Nov 22, 2025

Merged as ed1c5e4 , thanks!

@rfjakob rfjakob closed this Nov 22, 2025
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