mirror_zfs/include/sys
rmacklem 2957eabbef
Add support for FreeBSD's Solaris style extended attribute interface
FreeBSD commit 2ec2ba7e232d added the Solaris style syscall interface
for extended attributes.  This patch wires this interface into the
FreeBSD ZFS port, since this style of extended attributes is supported
by OpenZFS internally when the "xattr" property is set to "dir".

Some specific changes:
LOOKUP_NAMED_ATTR is defined to indicate the need to set V_NAMEDATTR
for calls to zfs_zaccess().
V_NAMEDATTR indicates that the access checking does need to be done
for FreeBSD.

The access checking code for extended attributes was copy/pasted from
the Linux port into zfs_zaccess() in the FreeBSD port.

Most of the changes are in zfs_freebsd_lookup() and
zfs_freebsd_create().
The semantics of these functions should remain unchanged unless named
attributes are being manipulated.

All the code changes are enabled for __FreeBSD_version 1500040 and
newer.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com>
Signed-off-by: Rick Macklem <rmacklem@uoguelph.ca>
Closes #17540
2025-07-30 09:49:43 -07:00
..
crypto SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
fm events: include zio type in IO error reports 2025-05-30 10:29:29 -04:00
fs Introduce zfs rewrite subcommand (#17246) 2025-05-12 10:22:17 -07:00
lua SPDX: license tags: MIT 2025-03-13 17:56:54 -07:00
sysevent SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
zstd SPDX: license tags: BSD-3-Clause 2025-03-13 17:56:50 -07:00
abd_impl.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
abd.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
aggsum.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
arc_impl.h enforce arc_dnode_limit 2025-07-21 10:32:01 -07:00
arc.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
asm_linkage.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
avl_impl.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
avl.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
bitmap.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
bitops.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
blake3.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
blkptr.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
bplist.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
bpobj.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
bptree.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
bqueue.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
brt_impl.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
brt.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
btree.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
dataset_kstats.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
dbuf.h ARC: Notify dbuf cache about target size reduction 2025-05-14 10:34:14 -04:00
ddt_impl.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
ddt.h Handle interaction between gang blocks, copies, and FDT. 2025-04-21 11:26:30 -04:00
dmu_impl.h Wire O_DIRECT also to Uncached I/O (#17218) 2025-05-13 14:26:55 -07:00
dmu_objset.h Relax special_small_blocks restrictions 2025-07-02 11:11:37 -07:00
dmu_recv.h cred: properly pass and test creds on other threads (#17273) 2025-04-29 16:27:48 -07:00
dmu_redact.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
dmu_send.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
dmu_traverse.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
dmu_tx.h dmu_tx: break tx assign/wait when pool suspends 2025-05-28 10:28:51 -07:00
dmu_zfetch.h Wire O_DIRECT also to Uncached I/O (#17218) 2025-05-13 14:26:55 -07:00
dmu.h Improve block cloning transactions accounting 2025-06-11 11:59:16 -07:00
dnode.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
dsl_bookmark.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
dsl_crypt.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
dsl_dataset.h dsl_dataset: rename dmu_objset_clone* to dsl_dataset_clone* 2025-06-10 14:52:43 -07:00
dsl_deadlist.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
dsl_deleg.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
dsl_destroy.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
dsl_dir.h cred: properly pass and test creds on other threads (#17273) 2025-04-29 16:27:48 -07:00
dsl_pool.h Unified allocation throttling (#17020) 2025-03-24 09:25:01 -07:00
dsl_prop.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
dsl_scan.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
dsl_synctask.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
dsl_userhold.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
edonr.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
efi_partition.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
frame.h Linux build: silence objtool warnings 2025-06-04 17:40:09 -07:00
hkdf.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
metaslab_impl.h Include class name into struct metaslab_class 2025-06-03 11:12:59 -04:00
metaslab.h metaslab: don't pass whole zio to throttle reserve APIs 2025-07-04 23:22:22 -04:00
mmp.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
mntent.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
multilist.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
nvpair_impl.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
nvpair.h nvlist: Add nvlist_snprintf() and zfs_dbgmsg_nvlist() 2025-04-18 09:22:16 -04:00
objlist.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
pathname.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
qat.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
range_tree.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
rrwlock.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
sa_impl.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
sa.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
sha2.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
skein.h SPDX: license tags: LicenseRef-OpenZFS-ThirdParty-PublicDomain 2025-03-13 17:57:31 -07:00
spa_checkpoint.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
spa_checksum.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
spa_impl.h Allow and prefer special vdevs as ZIL 2025-07-18 18:44:14 -07:00
spa_log_spacemap.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
spa.h spa: update blkptr diagram to include vdev padding on encrypted blocks 2025-07-24 09:50:23 -04:00
space_map.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
space_reftree.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
sysevent.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
txg_impl.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
txg.h txg_wait_synced_flags: add TXG_WAIT_SUSPEND flag to not wait if pool suspended 2025-05-28 10:27:46 -07:00
u8_textprep_data.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
u8_textprep.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
uberblock_impl.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
uberblock.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
uio_impl.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
unique.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
uuid.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
vdev_disk.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
vdev_draid.h Implement allocation size ranges and use for gang leaves (#17111) 2025-05-02 15:32:18 -07:00
vdev_file.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
vdev_impl.h mod.h: make consistent across all three platforms 2025-07-15 15:46:14 -07:00
vdev_indirect_births.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
vdev_indirect_mapping.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
vdev_initialize.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
vdev_raidz_impl.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
vdev_raidz.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
vdev_rebuild.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
vdev_removal.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
vdev_trim.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
vdev.h Implement dynamic gang header sizes 2025-07-09 14:02:53 -07:00
xvattr.h Add support for FreeBSD's Solaris style extended attribute interface 2025-07-30 09:49:43 -07:00
zap_impl.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
zap_leaf.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
zap.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
zcp_global.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
zcp_iter.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
zcp_prop.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
zcp_set.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
zcp.h cred: properly pass and test creds on other threads (#17273) 2025-04-29 16:27:48 -07:00
zfeature.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
zfs_acl.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
zfs_bootenv.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
zfs_chksum.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
zfs_context.h linux/kmem: remove PF_FSTRANS and PF_MEMALLOC_NOIO compat 2025-07-22 15:07:36 -07:00
zfs_debug.h nvlist: Add nvlist_snprintf() and zfs_dbgmsg_nvlist() 2025-04-18 09:22:16 -04:00
zfs_delay.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
zfs_file.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
zfs_fuid.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
zfs_impl.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
zfs_ioctl_impl.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
zfs_ioctl.h zfs_cmd: reorganise zfs_cmd_t to match original size 2025-05-27 20:01:06 -04:00
zfs_onexit.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
zfs_project.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
zfs_quota.h Show default quotas in zfs userspace tools 2025-04-03 10:36:45 -07:00
zfs_racct.h Wire O_DIRECT also to Uncached I/O (#17218) 2025-05-13 14:26:55 -07:00
zfs_ratelimit.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
zfs_refcount.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
zfs_rlock.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
zfs_sa.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
zfs_stat.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
zfs_sysfs.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
zfs_vfsops.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
zfs_vnops.h Introduce zfs rewrite subcommand (#17246) 2025-05-12 10:22:17 -07:00
zfs_znode.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
zil_impl.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
zil.h Allow and prefer special vdevs as ZIL 2025-07-18 18:44:14 -07:00
zio_checksum.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
zio_compress.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
zio_crypt.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
zio_impl.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
zio.h Implement dynamic gang header sizes 2025-07-09 14:02:53 -07:00
zrlock.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
zthr.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
zvol_impl.h ZVOL: Make zvol_prefetch_bytes module parameter platform-independent 2025-05-31 09:58:54 -04:00
zvol.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00