forked from openzfs/zfs
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Store common Linux xattrs as native SA with xattr=sa
This patch adds a new class of system atributes which are referred to as "Native SA xattrs". The facilities described here are only enabled when "xattr=sa" is set. If xattr=sa is set, the following "security." and "system." xattrs are stored as native SA xattrs rather than as elements of the ZPL_DXATTR SA: xattr System atrribute -------------------------------------------------------- security.selinux ZPL_SECURITY_SELINUX security.capability ZPL_SECURITY_CAPABILITY system.posix_acl_access ZPL_SYSTEM_POSIX_ACL_ACCESS system.posix_acl_default ZPL_SYSTEM_POSIX_ACL_DEFAULT Storing these xattrs as native system attributes allows for the ZPL to more easily and naturally operate on them as an atomic part of other operations and will be used as the foundation for fixing issue openzfs#2718. Zdb will display these under the new "Native SA xattrs" section. Lookups of these xattrs will use the following priority: 1. Native SA xattr (as shown in the able above) 2. Linux ZPL_DXATTR nvlist 3. Traditional ZFS directory-style xattr Modifications of these xattrs will erase an existing ZPL_DXATTR instance of an identically-named xattrs but will not change an existing instance of an identically-named directory-style xattr. If a modification of the ZPL_DXATTR SA causes it to become empty, the ZPL_DXATTR SA, itself is deleted to maximize available space in the bonus buffer. The effect is that existing ZPL_DXATTR SAs are automatically upgraded as they are changed.
- Loading branch information
Showing
5 changed files
with
361 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.