Sherlock-Holo / fuse3

an async version fuse library for rust
MIT License
83 stars 17 forks source link

Document that getxattr *must* return ERANGE if the size is insufficient #11

Closed asomers closed 3 years ago

asomers commented 3 years ago

The FUSE protocol specifies that the response to FUSE_GETXATTR is a data buffer without header when sending data, or a struct fuse_getxattr_out when sending the attribute's size. However, since the data buffer does not include a header it is impossible for the kernel to distinguish between a struct fuse_getxattr_out and a data buffer if exactly the same size. Therefore, FUSE servers must always return ERANGE if the provided size was insufficient.

Sherlock-Holo commented 3 years ago

LGTM, thanks for your help:)