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.
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.