gfs2: Add trusted xattr support
authorAndreas Gruenbacher <agruenba@redhat.com>
Fri, 5 Feb 2021 17:10:18 +0000 (17:10 +0000)
committerAndreas Gruenbacher <agruenba@redhat.com>
Mon, 8 Feb 2021 12:01:24 +0000 (13:01 +0100)
commit866eef48d80234e1ea3a2f78b54afc563be3ea4a
tree61626e0bd41554a4645d3c61e34488c4491765fe
parent47b7ec1daa511cd82cb9c31e88bfdb664b031d2a
gfs2: Add trusted xattr support

Add support for an additional filesystem version (sb_fs_format = 1802).
When a filesystem with the new version is mounted, the filesystem
supports "trusted.*" xattrs.

In addition, version 1802 filesystems implement a form of forward
compatibility for xattrs: when xattrs with an unknown prefix (ea_type)
are found on a version 1802 filesystem, those attributes are not shown
by listxattr, and they are not accessible by getxattr, setxattr, or
removexattr.

This mechanism might turn out to be what we need in the future, but if
not, we can always bump the filesystem version and break compatibility
instead.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Andrew Price <anprice@redhat.com>
fs/gfs2/ops_fstype.c
fs/gfs2/super.h
fs/gfs2/xattr.c
include/uapi/linux/gfs2_ondisk.h