The btrfs_is_valid_xattr function allows names of the form "prefix." which don't make much sense as valid names. Having at least "prefix.*" should be required for a valid name and is the behavior exhibited by the ext filesystems (and expected in the attr test suite).
Do you have a reproducer? $ touch file $ setfattr -n btrfs. -v 1 file straced, shows that it does not pass: setxattr("file", "btrfs.", "1", 1, 0) = -1 EINVAL (Invalid argument)
Yes sorry I didn't include that. Your example fails because the attributes have to have a valid prefix (see xattr.c:330 btrfs_is_valid_xattr for the prefixes allowed). $ touch file $ setfattr -n user. -v 1 file $ getfattr file # file: file user.
Fixed by: https://patchwork.kernel.org/patch/6094101/