Backport overlay xattr nesting as required for composefs
In order to support overlay lower dirs inside a composefs (which is a overlayfs mount) we need to backport the overlayfs xattr escaping mechanism from upstream linux 6.7. This is needed for the usecase of supporting a container storage directory (which is an overlayfs lower) inside a composefs mount.
This will be needed for bootc (https://github.com/containers/bootc/issues/128) as well as automotive.
I tested this with the "for-next" branch of xfstest which has a test for this functionality (overlay/084).
Most of the backports are trivial cherry-picks, except the first one that moves all xattr code to xattr.c. I had to change so that it is moving the current code rather than whatever was upstream when the code motion happened. No complicated differences though.
JIRA: https://issues.redhat.com/browse/RHEL-21350
Signed-off-by: Alexander Larsson alexl@redhat.com