HomeFreeBSD

Honor xattr=sa dataset property

Description

Honor xattr=sa dataset property

ZFS incorrectly uses directory-based extended attributes even when
xattr=sa is specified as a dataset property or mount option. Support to
honor temporary mount options including "xattr" was added in commit
0282c4137e7409e6d85289f4955adf07fac834f5. There are two issues with the
mount option handling:

  • Libzfs has historically included "xattr" in its list of default mount options. This overrides the dataset property, so the dataset is always configured to use directory-based xattrs even when the xattr dataset property is set to off or sa. Address this by removing "xattr" from the set of default mount options in libzfs.
  • There was no way to enable system attribute-based extended attributes using temporary mount options. Add the mount options "saxattr" and "dirxattr" which enable the xattr behavior their names suggest. This approach has the advantages of mirroring the valid xattr dataset property values and following existing conventions for mount option names.

Signed-off-by: Ned Bass <bass6@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #3787

Details

Provenance
Ned Bass <bass6@llnl.gov>Authored on Sep 16 2015, 9:49 AM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Sep 19 2015, 9:04 PM
Parents
rG66aad10ce88f: Fix NULL as mount(2) syscall data parameter
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG3af56fd95fbe: Honor xattr=sa dataset property (authored by Ned Bass <bass6@llnl.gov>).Sep 19 2015, 9:04 PM