opnsense-src/sys/fs
Rick Macklem 37b2cb5ecb vfs: Add support for file cloning to VOP_COPY_FILE_RANGE
NFSv4 has a separate CLONE operation from COPY with
a couple of semantics differences. Unlike COPY, CLONE
must complete the "copy on write" and cannot return
partially copied. It also is required to use offsets (and
the length if not to EOF) that are aligned to a buffer
boundary.

Since VOP_COPY_FILE_RANGE() can already do "copy on write"
for file systems that support it, such as ZFS with block
cloning enabled, all this patch does is add a flag called
COPY_FILE_RANGE_CLONE so that it will conform to the
rule that it must do a "copy on write" to completion.

The patch also adds a new pathconf(2) name _PC_CLONE_BLKSIZE,
which acquires the blocksize requirement for cloning and
returns 0 for file systems that do not support the
"copy on write" feature. (This is needed for the NFSv4.2
clone_blksize attribute.)

This patch will allow the implementation of CLONE
for NFSv4.2.

Reviewed by:	asomers
Differential Revision:	https://reviews.freebsd.org/D51808
2025-08-07 17:52:23 -07:00
..
autofs Reduce reliance on sys/sysproto.h pollution 2024-04-15 21:35:40 +01:00
cd9660 cd9660: Add _WANT_ISO_MNT 2025-06-16 22:32:09 +01:00
cuse cuse: Use NULL for SYSUNINIT's last arg, which is a pointer type 2024-12-10 01:14:07 +08:00
deadfs sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
devfs devfs readdir: handle short buffer same as UFS 2025-08-01 19:48:53 +03:00
ext2fs ext2fs: 'struct ufid': Re-order fields and unpack 2024-12-13 15:04:50 +01:00
fdescfs fdescfs: Set *eofflag in fdesc_readdir() 2025-07-15 12:52:58 +00:00
fifofs sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
fuse vfs: Add support for file cloning to VOP_COPY_FILE_RANGE 2025-08-07 17:52:23 -07:00
mntfs sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
msdosfs msdosfs: replace '/' in direntries with '?' 2025-07-18 00:53:54 +03:00
nfs nfscl: Fix GetACL so that it does not want a reply cached 2025-08-04 16:36:28 -07:00
nfsclient kern: start tracking cr_gid outside of cr_groups[] 2025-07-30 23:44:11 -05:00
nfsserver kern: rename crsetgroups_fallback, document it in ucred(9) 2025-07-31 19:50:48 -05:00
nullfs vfs: Initial revision of inotify 2025-07-04 14:42:33 +00:00
p9fs p9fs: Set vnode state in p9fs_vget_common() 2025-08-04 22:06:17 +00:00
procfs proc_rwmem check PRIV_PROC_MEM_WRITE when writing 2024-11-08 16:11:33 -08:00
pseudofs pseudofs: Simplify pfs_readdir() and set eofflag 2025-07-23 16:20:31 +00:00
smbfs smbfs: Set eofflag in VOP_READDIR 2025-07-23 16:20:31 +00:00
tarfs tarfs: 'struct tarfs_fid': Switch 'gen' to 'u_int', avoid packing 2024-12-13 15:04:42 +01:00
tmpfs tmpfs: Remove uses of DEBUG_VFS_LOCKS 2025-08-03 21:52:14 +00:00
udf udf: Improve input validation. 2025-07-16 21:33:41 +02:00
unionfs namei: Fix cn_flags width in various places 2025-05-27 13:29:14 +00:00