smbc_getxattr and friends can error with ERANGE when the buffer size is too small. This isn't documented.
Can you submit a patch with the documentation you'd like to see on this please ?