History

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.

Andreas Gruenbacher committed 5 years ago

Commit 866eef41 parent 47b7ec14 files · +63 −8Browse files

Showing the changes to include/uapi (1 of 4 files). Show all

Unified · Split

include/uapi/linux/gfs2_ondisk.h+3−2
@@ -47,7 +47,7 @@ · 46 unmodified lines
47#define GFS2_FORMAT_DE 120047#define GFS2_FORMAT_DE 1200
48#define GFS2_FORMAT_QU 150048#define GFS2_FORMAT_QU 1500
49/* These are part of the superblock */49/* These are part of the superblock */
50#define GFS2_FORMAT_FS 180150#define GFS2_FORMAT_FS 1802
51#define GFS2_FORMAT_MULTI 190051#define GFS2_FORMAT_MULTI 1900
52 52
53/*53/*
@@ -389,8 +389,9 @@ struct gfs2_leaf { · 335 unmodified lines
389#define GFS2_EATYPE_USR 1389#define GFS2_EATYPE_USR 1
390#define GFS2_EATYPE_SYS 2390#define GFS2_EATYPE_SYS 2
391#define GFS2_EATYPE_SECURITY 3391#define GFS2_EATYPE_SECURITY 3
392#define GFS2_EATYPE_TRUSTED 4
392 393
393#define GFS2_EATYPE_LAST 3394#define GFS2_EATYPE_LAST 4
394#define GFS2_EATYPE_VALID(x) ((x) <= GFS2_EATYPE_LAST)395#define GFS2_EATYPE_VALID(x) ((x) <= GFS2_EATYPE_LAST)
395 396
396#define GFS2_EAFLAG_LAST 0x01 /* last ea in block */397#define GFS2_EAFLAG_LAST 0x01 /* last ea in block */