xattr dataset prop: change defaults to sa

It's the main recommendation to set xattr=sa
even in man pages, so let's set it by default.

xattr=sa don't use feature flag, so in the worst
case we'll have non-readable xattrs by other
non-openzfs platforms.

Non-overridden default `xattr` prop of existing pools
will automatically use `sa` after this commit too.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: George Melikov <mail@gmelikov.ru>
Closes #15147
This commit is contained in:
George Melikov
2024-09-23 19:50:48 +03:00
committed by GitHub
parent 1d84c9eb66
commit e419a63bf4
6 changed files with 14 additions and 12 deletions
+7 -5
View File
@@ -1971,14 +1971,13 @@ enabled for virus scanning to occur.
The default value is
.Sy off .
This property is not used by OpenZFS.
.It Sy xattr Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Sy sa
.It Sy xattr Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Sy dir Ns | Ns Sy sa
Controls whether extended attributes are enabled for this file system.
Two styles of extended attributes are supported: either directory-based
or system-attribute-based.
.Pp
The default value of
.Sy on
enables directory-based extended attributes.
Directory-based extended attributes can be enabled by setting the value to
.Sy dir .
This style of extended attribute imposes no practical limit
on either the size or number of attributes which can be set on a file.
Although under Linux the
@@ -1991,7 +1990,10 @@ This is the most compatible
style of extended attribute and is supported by all ZFS implementations.
.Pp
System-attribute-based xattrs can be enabled by setting the value to
.Sy sa .
.Sy sa
(default and equal to
.Sy on
) .
The key advantage of this type of xattr is improved performance.
Storing extended attributes as system attributes
significantly decreases the amount of disk I/O required.