posix acls: Move namespace conversion into filesystem / xattr handlers

*** FIXME ***
9p passes through xattr value to v9fs_xattr_set without converting
uif/gid namespaces.  Does any other filesystem do the same?
*** FIXME ***

Currently, getxattr() and setxattr() check for the xattr names
"system.posix_acl_{access,default}" and perform in-place UID / GID
namespace mappings in the xattr values. Filesystems then again check for
the same xattr names to handle those attributes, almost always using the
standard posix_acl_{access,default}_xattr_handler handlers.  This is
unnecessary overhead; move the namespace conversion into the xattr
handlers instead.

For filesystems that use the POSIX ACL xattr handlers, no change is
required.  Filesystems that don't use those handlers (cifs and lustre)
need to take care of the namespace mapping themselves now.

The only user left of the posix_acl_fix_xattr_{from,to}_user helpers is
lustre, so this patch moves them into lustre.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Reviewed-by: Steve French <steve.french@primarydata.com> [except lustre part]
8 files changed