#include <sys/vnode_if.h>

sys/vnode_if.h Kernel.framework

56 variables · 54 structs · 8 functions · 6 macros · 3 typedefs · 3 enums

variablevnop_default_desc

extern struct vnodeop_desc vnop_default_desc

variablevnop_lookup_desc

extern struct vnodeop_desc vnop_lookup_desc

variablevnop_create_desc

extern struct vnodeop_desc vnop_create_desc

variablevnop_whiteout_desc

extern struct vnodeop_desc vnop_whiteout_desc
obsolete

variablevnop_mknod_desc

extern struct vnodeop_desc vnop_mknod_desc

variablevnop_open_desc

extern struct vnodeop_desc vnop_open_desc

variablevnop_close_desc

extern struct vnodeop_desc vnop_close_desc

variablevnop_access_desc

extern struct vnodeop_desc vnop_access_desc

variablevnop_getattr_desc

extern struct vnodeop_desc vnop_getattr_desc

variablevnop_setattr_desc

extern struct vnodeop_desc vnop_setattr_desc

variablevnop_read_desc

extern struct vnodeop_desc vnop_read_desc

variablevnop_write_desc

extern struct vnodeop_desc vnop_write_desc

variablevnop_ioctl_desc

extern struct vnodeop_desc vnop_ioctl_desc

variablevnop_select_desc

extern struct vnodeop_desc vnop_select_desc

variablevnop_exchange_desc

extern struct vnodeop_desc vnop_exchange_desc

variablevnop_revoke_desc

extern struct vnodeop_desc vnop_revoke_desc

variablevnop_mmap_check_desc

extern struct vnodeop_desc vnop_mmap_check_desc

variablevnop_mmap_desc

extern struct vnodeop_desc vnop_mmap_desc

variablevnop_mnomap_desc

extern struct vnodeop_desc vnop_mnomap_desc

variablevnop_fsync_desc

extern struct vnodeop_desc vnop_fsync_desc

variablevnop_remove_desc

extern struct vnodeop_desc vnop_remove_desc

variablevnop_rename_desc

extern struct vnodeop_desc vnop_rename_desc

variablevnop_renamex_desc

extern struct vnodeop_desc vnop_renamex_desc

variablevnop_mkdir_desc

extern struct vnodeop_desc vnop_mkdir_desc

variablevnop_rmdir_desc

extern struct vnodeop_desc vnop_rmdir_desc

variablevnop_readdir_desc

extern struct vnodeop_desc vnop_readdir_desc

variablevnop_readdirattr_desc

extern struct vnodeop_desc vnop_readdirattr_desc

variablevnop_getattrlistbulk_desc

extern struct vnodeop_desc vnop_getattrlistbulk_desc

variablevnop_inactive_desc

extern struct vnodeop_desc vnop_inactive_desc

variablevnop_reclaim_desc

extern struct vnodeop_desc vnop_reclaim_desc

variablevnop_print_desc

extern struct vnodeop_desc vnop_print_desc

variablevnop_pathconf_desc

extern struct vnodeop_desc vnop_pathconf_desc

variablevnop_advlock_desc

extern struct vnodeop_desc vnop_advlock_desc

variablevnop_truncate_desc

extern struct vnodeop_desc vnop_truncate_desc

variablevnop_allocate_desc

extern struct vnodeop_desc vnop_allocate_desc

variablevnop_pagein_desc

extern struct vnodeop_desc vnop_pagein_desc

variablevnop_pageout_desc

extern struct vnodeop_desc vnop_pageout_desc

variablevnop_searchfs_desc

extern struct vnodeop_desc vnop_searchfs_desc

variablevnop_copyfile_desc

extern struct vnodeop_desc vnop_copyfile_desc

variablevnop_clonefile_desc

extern struct vnodeop_desc vnop_clonefile_desc

variablevnop_blktooff_desc

extern struct vnodeop_desc vnop_blktooff_desc

variablevnop_offtoblk_desc

extern struct vnodeop_desc vnop_offtoblk_desc

variablevnop_blockmap_desc

extern struct vnodeop_desc vnop_blockmap_desc

variablevnop_strategy_desc

extern struct vnodeop_desc vnop_strategy_desc

variablevnop_bwrite_desc

extern struct vnodeop_desc vnop_bwrite_desc

variablevnop_monitor_desc

extern struct vnodeop_desc vnop_monitor_desc

structvnop_lookup_args

@function VNOP_LOOKUP @abstract Call down to a filesystem to look for a directory entry by name. @discussion VNOP_LOOKUP is the key pathway through which VFS asks a filesystem to find a file. The vnode should be returned with an iocount to be dropped by the caller. A VNOP_LOOKUP() calldown can come without a preceding VNOP_OPEN(). @param dvp Directory in which to look up file. @param vpp Destination for found vnode. @param cnp Structure describing filename to find, reason for lookup, and various other data. @param ctx Context against which to authenticate lookup request. @return 0 for success or a filesystem-specific error.
size 40, align 8
struct vnodeop_desc *a_desc
vnode_ta_dvp
vnode_t *a_vpp
struct componentname *a_cnp
vfs_context_ta_context

structvnop_create_args

@function VNOP_CREATE @abstract Call down to a filesystem to create a regular file (VREG). @discussion If file creation succeeds, "vpp" should be returned with an iocount to be dropped by the caller. A VNOP_CREATE() calldown can come without a preceding VNOP_OPEN(). @param dvp Directory in which to create file. @param vpp Destination for vnode for newly created file. @param cnp Description of filename to create. @param vap File creation properties, as seen in vnode_getattr(). Manipulated with VATTR_ISACTIVE, VATTR_RETURN, VATTR_SET_SUPPORTED, and so forth. @param ctx Context against which to authenticate file creation. @return 0 for success or a filesystem-specific error.
size 48, align 8
struct vnodeop_desc *a_desc
vnode_ta_dvp
vnode_t *a_vpp
struct componentname *a_cnp
struct vnode_attr *a_vap
vfs_context_ta_context

structvnop_whiteout_args

@function VNOP_WHITEOUT @abstract Obsolete - no longer supported. @discussion Whiteouts are used to support the union filesystem, whereby one filesystem is mounted "transparently" on top of another. A whiteout in the upper layer of a union mount is a "deletion" of a file in the lower layer; lookups will catch the whiteout and fail, setting ISWHITEOUT in the componentname structure, even if an underlying file of the same name exists. The whiteout vnop is used for creation, deletion, and checking whether a directory supports whiteouts (see flags). also support the LOOKUP flag, which is used to test whether a directory supports whiteouts. @param dvp Directory in which to create. @param cnp Name information for whiteout. @param flags CREATE: create a whiteout. LOOKUP: check whether a directory supports whiteouts, DELETE: remove a whiteout. @param ctx Context against which to authenticate whiteout creation. @return 0 for success or a filesystem-specific error. Returning 0 for LOOKUP indicates that a directory does support whiteouts.
size 40, align 8
struct vnodeop_desc *a_desc
vnode_ta_dvp
struct componentname *a_cnp
inta_flags
vfs_context_ta_context

structvnop_mknod_args

@function VNOP_MKNOD @abstract Call down to a filesystem to create a special file. @discussion The mknod vnop is used to create character and block device files, named pipe (FIFO) files, and named sockets. The newly created file should be returned with an iocount which will be dropped by the caller. A VNOP_MKNOD() call can come down without a preceding VNOP_OPEN(). @param dvp Directory in which to create the special file. @param vpp Destination for newly created vnode. @param cnp Name information for new file. @param vap Attributes for new file, including type. @param ctx Context against which to authenticate node creation. @return 0 for success or a filesystem-specific error.
size 48, align 8
struct vnodeop_desc *a_desc
vnode_ta_dvp
vnode_t *a_vpp
struct componentname *a_cnp
struct vnode_attr *a_vap
vfs_context_ta_context

structvnop_open_args

@function VNOP_OPEN @abstract Call down to a filesystem to open a file. @discussion The open vnop gives a filesystem a chance to initialize a file for operations like reading, writing, and ioctls. VFS promises to send down exactly one VNOP_CLOSE() for each VNOP_OPEN(). @param vp File to open. @param mode FREAD and/or FWRITE. @param ctx Context against which to authenticate open. @return 0 for success or a filesystem-specific error.
size 32, align 8
struct vnodeop_desc *a_desc
vnode_ta_vp
inta_mode
vfs_context_ta_context

structvnop_close_args

@function VNOP_CLOSE @abstract Call down to a filesystem to close a file. @discussion The close vnop gives a filesystem a chance to release state set up by a VNOP_OPEN(). VFS promises to send down exactly one VNOP_CLOSE() for each VNOP_OPEN(). @param vp File to close. @param fflag FREAD and/or FWRITE; in the case of a file opened with open(2), fflag corresponds to how the file was opened. @param ctx Context against which to authenticate close. @return 0 for success or a filesystem-specific error.
size 32, align 8
struct vnodeop_desc *a_desc
vnode_ta_vp
inta_fflag
vfs_context_ta_context

structvnop_access_args

@function VNOP_ACCESS @abstract Call down to a filesystem to see if a kauth-style operation is permitted. @discussion VNOP_ACCESS is currently only called on filesystems which mark themselves as doing their authentication remotely (vfs_setauthopaque(), vfs_authopaque()). A VNOP_ACCESS() calldown may come without any preceding VNOP_OPEN(). @param vp File to authorize action for. @param action kauth-style action to be checked for permissions, e.g. KAUTH_VNODE_DELETE. @param ctx Context against which to authenticate action. @return 0 for success or a filesystem-specific error.
size 32, align 8
struct vnodeop_desc *a_desc
vnode_ta_vp
inta_action
vfs_context_ta_context

structvnop_getattr_args

@function VNOP_GETATTR @abstract Call down to a filesystem to get vnode attributes. @discussion Supported attributes ("Yes, I am returning this information") are set with VATTR_SET_SUPPORTED. Which attributes have been requested is checked with VATTR_IS_ACTIVE. Attributes are returned with VATTR_RETURN. It is through VNOP_GETATTR that routines like stat() get their information. A VNOP_GETATTR() calldown may come without any preceding VNOP_OPEN(). @param vp The vnode whose attributes to get. @param vap Container for which attributes are requested, which attributes are supported by the filesystem, and attribute values. @param ctx Context against which to authenticate request for attributes. @return 0 for success or a filesystem-specific error. VNOP_GETATTR() can return success even if not all requested attributes were returned; returning an error-value should indicate that something went wrong, rather than that some attribute is not supported.
size 32, align 8
struct vnodeop_desc *a_desc
vnode_ta_vp
struct vnode_attr *a_vap
vfs_context_ta_context

structvnop_setattr_args

@function VNOP_SETATTR @abstract Call down to a filesystem to set vnode attributes. @discussion Supported attributes ("Yes, I am setting this attribute.") are set with VATTR_SET_SUPPORTED. Requested attributes are checked with VATTR_IS_ACTIVE. Attribute values are accessed directly through structure fields. VNOP_SETATTR() is the core of the KPI function vnode_setattr(), which is used by chmod(), chown(), truncate(), and many others. A VNOP_SETATTR() call may come without any preceding VNOP_OPEN(). @param vp The vnode whose attributes to set. @param vap Container for which attributes are to be set and their desired values, as well as for the filesystem to return information about which attributes were successfully set. @param ctx Context against which to authenticate request for attribute change. @return 0 for success or a filesystem-specific error. VNOP_SETATTR() can return success even if not all requested attributes were set; returning an error-value should indicate that something went wrong, rather than that some attribute is not supported.
size 32, align 8
struct vnodeop_desc *a_desc
vnode_ta_vp
struct vnode_attr *a_vap
vfs_context_ta_context

structvnop_read_args

@function VNOP_READ @abstract Call down to a filesystem to read file data. @discussion VNOP_READ() is where the hard work of of the read() system call happens. The filesystem may use the buffer cache, the cluster layer, or an alternative method to get its data; uio routines will be used to see that data is copied to the correct virtual address in the correct address space and will update its uio argument to indicate how much data has been moved. @param vp The vnode to read from. @param uio Description of request, including file offset, amount of data requested, destination address for data, and whether that destination is in kernel or user space. @param ioflag IO flags as defined in vnode.h, e.g. IO_SYNC, IO_NODELOCKED @param ctx Context against which to authenticate read request. @return 0 for success or a filesystem-specific error. VNOP_READ() can return success even if less data was read than originally requested; returning an error value should indicate that something actually went wrong.
size 40, align 8
struct vnodeop_desc *a_desc
vnode_ta_vp
struct uio *a_uio
inta_ioflag
vfs_context_ta_context

functionVNOP_READ

extern errno_t VNOP_READ(vnode_t vp, struct uio *uio, int ioflag, vfs_context_t ctx)
claude-fable-5, 2026-08-23 · not from Apple sources · verified against xnu bsd/sys/vnode_if.h, bsd/vfs/kpi_vfs.c
Calls down to the filesystem to read file data; the heart of the read() system call. The filesystem may use the buffer cache, the cluster layer, or another method; uio routines copy the data to the correct virtual address in the correct address space and update the uio to show how much was moved. ioflag carries IO_* flags from vnode.h (IO_SYNC, IO_NODELOCKED, ...); ctx authenticates the request. Returns 0 for success or a filesystem-specific error; success may be returned even if less data was read than requested.

structvnop_write_args

@function VNOP_WRITE @abstract Call down to the filesystem to write file data. @discussion VNOP_WRITE() is to write() as VNOP_READ() is to read(). The filesystem may use the buffer cache, the cluster layer, or an alternative method to write its data; uio routines will be used to see that data is copied to the correct virtual address in the correct address space and will update its uio argument to indicate how much data has been moved. @param vp The vnode to write to. @param uio Description of request, including file offset, amount of data to write, source address for data, and whether that destination is in kernel or user space. @param ioflag IO flags as defined in vnode.h, e.g. IO_SYNC, IO_NODELOCKED @param ctx Context against which to authenticate write request. @return 0 for success or a filesystem-specific error. VNOP_WRITE() can return success even if less data was written than originally requested; returning an error value should indicate that something actually went wrong.
size 40, align 8
struct vnodeop_desc *a_desc
vnode_ta_vp
struct uio *a_uio
inta_ioflag
vfs_context_ta_context

functionVNOP_WRITE

extern errno_t VNOP_WRITE(vnode_t vp, struct uio *uio, int ioflag, vfs_context_t ctx)
claude-fable-5, 2026-08-23 · not from Apple sources · verified against xnu bsd/sys/vnode_if.h, bsd/vfs/kpi_vfs.c
Calls down to the filesystem to write file data; VNOP_WRITE() is to write() as VNOP_READ() is to read(). The filesystem may use the buffer cache, the cluster layer, or another method; uio routines copy data from the source address space and update the uio to show how much was moved. ioflag carries IO_* flags (IO_SYNC, IO_APPEND, IO_UNIT, ...); ctx authenticates the request. Returns 0 for success or a filesystem-specific error.

structvnop_ioctl_args

@function VNOP_IOCTL @abstract Call down to a filesystem or device driver to execute various control operations on or request data about a file. @discussion Ioctl controls are typically associated with devices, but they can in fact be passed down for any file; they are used to implement any of a wide range of controls and information requests. fcntl() calls VNOP_IOCTL for several commands, and will attempt a VNOP_IOCTL if it is passed an unknown command, though no copyin or copyout of arguments can occur in this case--the "arg" must be an integer value. Filesystems can define their own fcntls using this mechanism. How ioctl commands are structured is slightly complicated; see the manual page for ioctl(2). @param vp The vnode to execute the command on. @param command Identifier for action to take. @param data Pointer to data; this can be an integer constant (of 32 bits only) or an address to be read from or written to, depending on "command." If it is an address, it is valid and resides in the kernel; callers of VNOP_IOCTL() are responsible for copying to and from userland. @param ctx Context against which to authenticate ioctl request. @return 0 for success or a filesystem-specific error.
size 48, align 8
struct vnodeop_desc *a_desc
vnode_ta_vp
u_longa_command
caddr_ta_data
inta_fflag
vfs_context_ta_context

functionVNOP_IOCTL

extern errno_t VNOP_IOCTL(
	vnode_t vp,
	u_long command,
	caddr_t data,
	int fflag,
	vfs_context_t ctx
)
claude-fable-5, 2026-08-23 · not from Apple sources · verified against xnu bsd/sys/vnode_if.h, bsd/vfs/kpi_vfs.c
Calls down to a filesystem or device driver to execute a control operation on, or request data about, a file, in the manner of ioctl(2). Though typically associated with devices, ioctls can be passed down for any file, and filesystems can define their own fcntls this way; fcntl() attempts a VNOP_IOCTL for unknown commands, in which case no copyin/copyout occurs and data must be an integer value. If data is an address it resides in the kernel; the caller is responsible for user copies. Returns 0 for success or a filesystem-specific error.

structvnop_select_args

@function VNOP_SELECT @abstract Call down to a filesystem or device to check if a file is ready for I/O and request later notification if it is not currently ready. @discussion In general, regular are always "ready for I/O" and their select vnops simply return "1." Devices, though, may or may not be read; they keep track of who is selecting on them and send notifications when they become ready. xnu provides structures and routines for tracking threads waiting for I/O and waking up those threads: see selrecord(), selthreadclear(), seltrue(), selwait(), selwakeup(), and the selinfo structure (sys/select.h). @param vp The vnode to check for I/O readiness. @param which What kind of I/O is desired: FREAD, FWRITE. @param fflags Flags from fileglob as seen in fcntl.h, e.g. O_NONBLOCK, O_APPEND. @param wql Opaque object to pass to selrecord(). @param ctx Context to authenticate for select request. @return Nonzero indicates that a file is ready for I/O. 0 indicates that the file is not ready for I/O; there is no way to return an error. 0 should be returned if the device (or file) is not ready for I/O and the driver (or filesystem) is going to track the request and provide subsequent wakeups. the device (or filesystem) will provide a wakeup.
size 40, align 8
struct vnodeop_desc *a_desc
vnode_ta_vp
inta_which
inta_fflags
void *a_wql
vfs_context_ta_context

structvnop_exchange_args

@function VNOP_EXCHANGE @abstract Call down to a filesystem to atomically exchange the data of two files. @discussion VNOP_EXCHANGE() is currently only called by the exchangedata() system call. It will only be applied to files on the same volume. @param fvp First vnode. @param tvp Second vnode. @param options Unused. @param ctx Context to authenticate for exchangedata request. @return 0 for success, else an error code.
size 40, align 8
struct vnodeop_desc *a_desc
vnode_ta_fvp
vnode_ta_tvp
inta_options
vfs_context_ta_context

structvnop_revoke_args

@function VNOP_REVOKE @abstract Call down to a filesystem to invalidate all open file descriptors for a vnode. @discussion This function is typically called as part of a TTY revoke, but can also be used on regular files. Most filesystems simply use nop_revoke(), which calls vn_revoke(), as their revoke vnop implementation. @param vp The vnode to revoke. @param flags Unused. @param ctx Context to authenticate for revoke request. @return 0 for success, else an error code.
size 32, align 8
struct vnodeop_desc *a_desc
vnode_ta_vp
inta_flags
vfs_context_ta_context

structvnop_mmap_check_args

@function VNOP_MMAP_CHECK @abstract Check with a filesystem if a file can be mmap-ed. @discussion VNOP_MMAP_CHECK is used to check with the file system if a file can be mmap-ed. It will be called before any call to VNOP_MMAP(). @param vp The vnode being mmapped. @param flags Memory protection: PROT_READ, PROT_WRITE, PROT_EXEC. @param ctx Context to authenticate for mmap request. @return 0 for success; EPERM if the operation is not permitted; other errors (except ENOTSUP) may be returned at the discretion of the file system. ENOTSUP will never be returned by VNOP_MMAP_CHECK().
size 32, align 8
struct vnodeop_desc *a_desc
vnode_ta_vp
inta_flags
vfs_context_ta_context

structvnop_mmap_args

@function VNOP_MMAP @abstract Notify a filesystem that a file is being mmap-ed. @discussion VNOP_MMAP is an advisory calldown to say that the system is mmap-ing a file. @param vp The vnode being mmapped. @param flags Memory protection: PROT_READ, PROT_WRITE, PROT_EXEC. @param ctx Context to authenticate for mmap request. @return 0 for success; all errors except EPERM are ignored.
size 32, align 8
struct vnodeop_desc *a_desc
vnode_ta_vp
inta_fflags
vfs_context_ta_context

structvnop_mnomap_args

@function VNOP_MNOMAP @abstract Inform a filesystem that a file is no longer mapped. @discussion In general, no action is required of a filesystem for VNOP_MNOMAP. @param vp The vnode which is no longer mapped. @param ctx Context to authenticate for mnomap request. @return Return value is ignored.
size 24, align 8
struct vnodeop_desc *a_desc
vnode_ta_vp
vfs_context_ta_context

structvnop_fsync_args

@function VNOP_FSYNC @abstract Call down to a filesystem to synchronize a file with on-disk state. @discussion VNOP_FSYNC is called whenever we need to make sure that a file's data has been pushed to backing store, for example when recycling; it is also the heart of the fsync() system call. @param vp The vnode whose data to flush to backing store. @param ctx Context to authenticate for fsync request. @return 0 for success, else an error code.
size 32, align 8
struct vnodeop_desc *a_desc
vnode_ta_vp
inta_waitfor
vfs_context_ta_context

functionVNOP_FSYNC

extern errno_t VNOP_FSYNC(vnode_t vp, int waitfor, vfs_context_t ctx)
claude-fable-5, 2026-08-23 · not from Apple sources · verified against xnu bsd/sys/vnode_if.h, bsd/vfs/kpi_vfs.c
Calls down to the filesystem to synchronize a file with on-disk state; the heart of the fsync() system call, also used when a vnode is being recycled. waitfor (MNT_WAIT/MNT_NOWAIT) indicates whether to wait for I/O to complete; ctx authenticates the request. Returns 0 for success, else an error code.

structvnop_remove_args

@function VNOP_REMOVE @abstract Call down to a filesystem to delete a file. @discussion VNOP_REMOVE is called to remove a file from a filesystem's namespace, for example by unlink(). It can operate on regular files, named pipes, special files, and in some cases on directories. @param dvp Directory in which to delete a file. @param vp The file to delete. @param cnp Filename information. @param ctx Context to authenticate for fsync request. @return 0 for success, else an error code.
size 48, align 8
struct vnodeop_desc *a_desc
vnode_ta_dvp
vnode_ta_vp
struct componentname *a_cnp
inta_flags
vfs_context_ta_context

structvnop_rename_args

@function VNOP_RENAME @abstract Call down to a filesystem to rename a file. @discussion VNOP_RENAME() will only be called with a source and target on the same volume. @param fdvp Directory in which source file resides. @param fvp File being renamed. @param fcnp Name information for source file. @param tdvp Directory file is being moved to. @param tvp Existing file with same name as target, should one exist. @param tcnp Name information for target path. @param ctx Context to authenticate for rename request. @return 0 for success, else an error code.
size 64, align 8
struct vnodeop_desc *a_desc
vnode_ta_fdvp
vnode_ta_fvp
struct componentname *a_fcnp
vnode_ta_tdvp
vnode_ta_tvp
struct componentname *a_tcnp
vfs_context_ta_context

typedefvfs_rename_flags_t

typedef unsigned int vfs_rename_flags_t

enum(anonymous)

Must match sys/stdio.h
underlying type unsigned int
VFS_RENAME_SECLUDE1
VFS_RENAME_SWAP2
VFS_RENAME_EXCL4
VFS_RENAME_DATALESS8VFS_RENAME_DATALESS is kernel-only and is intentionally not included in VFS_RENAME_FLAGS_MASK.
VFS_RENAME_RESERVED116used by sys/stdio for RENAME_NOFOLLOW_ANY
VFS_RENAME_RESERVED232used by sys/stdio for RENAME_RESOLVE_BENEATH
VFS_RENAME_FLAGS_MASK7

structvnop_renamex_args

@function VNOP_RENAMEX @abstract Call down to a filesystem to rename a file. @discussion VNOP_RENAMEX() will only be called with a source and target on the same volume. @param fdvp Directory in which source file resides. @param fvp File being renamed. @param fcnp Name information for source file. @param tdvp Directory file is being moved to. @param tvp Existing file with same name as target, should one exist. @param tcnp Name information for target path. @param flags Control certain rename semantics. @param ctx Context to authenticate for rename request. @return 0 for success, else an error code.
size 80, align 8
struct vnodeop_desc *a_desc
vnode_ta_fdvp
vnode_ta_fvp
struct componentname *a_fcnp
vnode_ta_tdvp
vnode_ta_tvp
struct componentname *a_tcnp
struct vnode_attr *a_vapReserved for future use
vfs_rename_flags_ta_flags
vfs_context_ta_context

structvnop_mkdir_args

@function VNOP_MKDIR @abstract Call down to a filesystem to create a directory. @discussion The newly created directory should be returned with an iocount which will be dropped by the caller. @param dvp Directory in which to create new directory. @param vpp Destination for pointer to new directory's vnode. @param cnp Name information for new directory. @param vap Attributes for new directory. @param ctx Context to authenticate for mkdir request. @return 0 for success, else an error code.
size 48, align 8
struct vnodeop_desc *a_desc
vnode_ta_dvp
vnode_t *a_vpp
struct componentname *a_cnp
struct vnode_attr *a_vap
vfs_context_ta_context

structvnop_rmdir_args

@function VNOP_RMDIR @abstract Call down to a filesystem to delete a directory. @param dvp Parent of directory to be removed. @param vp Directory to remove. @param cnp Name information for directory to be deleted. @param ctx Context to authenticate for rmdir request. @return 0 for success, else an error code.
size 40, align 8
struct vnodeop_desc *a_desc
vnode_ta_dvp
vnode_ta_vp
struct componentname *a_cnp
vfs_context_ta_context

structvnop_readdir_args

@function VNOP_READDIR @abstract Call down to a filesystem to enumerate directory entries. @discussion VNOP_READDIR() packs a buffer with "struct dirent" directory entry representations as described by the "getdirentries" manual page. @param vp Directory to enumerate. @param uio Destination information for resulting direntries. @param flags VNODE_READDIR_EXTENDED, VNODE_READDIR_REQSEEKOFF, VNODE_READDIR_SEEKOFF32: Apple-internal flags. @param eofflag Should be set to 1 if the end of the directory has been reached. @param numdirent Should be set to number of entries written into buffer. @param ctx Context to authenticate for readdir request. @return 0 for success, else an error code.
size 56, align 8
struct vnodeop_desc *a_desc
vnode_ta_vp
struct uio *a_uio
inta_flags
int *a_eofflag
int *a_numdirent
vfs_context_ta_context

structvnop_readdirattr_args

size 72, align 8
struct vnodeop_desc *a_desc
vnode_ta_vp
struct attrlist *a_alist
struct uio *a_uio
uint32_ta_maxcount
uint32_ta_options
uint32_t *a_newstate
int *a_eofflag
uint32_t *a_actualcount
vfs_context_ta_context

structvnop_getattrlistbulk_args

size 80, align 8
struct vnodeop_desc *a_desc
vnode_ta_vp
struct attrlist *a_alist
struct vnode_attr *a_vap
struct uio *a_uio
void *a_private
uint64_ta_options
int32_t *a_eofflag
int32_t *a_actualcount
vfs_context_ta_context

structvnop_inactive_args

@function VNOP_INACTIVE @abstract Notify a filesystem that the last usecount (persistent reference) on a vnode has been dropped. @discussion VNOP_INACTVE() gives a filesystem a chance to aggressively release resources assocated with a vnode, perhaps even to call vnode_recycle(), but no action is prescribed; it is acceptable for VNOP_INACTIVE to be a no-op and to defer all reclamation until VNOP_RECLAIM(). VNOP_INACTVE() will not be called on a vnode if no persistent reference is ever taken; an important example is a stat(), which takes an iocount, reads its data, and drops that iocount. @param vp The vnode which is now inactive. @param ctx Context to authenticate for inactive message. @return 0 for success, else an error code, but return value is currently ignored.
size 24, align 8
struct vnodeop_desc *a_desc
vnode_ta_vp
vfs_context_ta_context

structvnop_reclaim_args

@function VNOP_RECLAIM @abstract Release filesystem-internal resources for a vnode. @discussion VNOP_RECLAIM() is called as part of the process of recycling a vnode. During a reclaim routine, a filesystem should remove a vnode from its hash and deallocate any resources allocated to that vnode. VFS guarantees that when VNOP_RECLAIM() is called, there are no more iocount references on a vnode (though there may still be usecount references--these are invalidated by the reclaim) and that no more will be granted. This means in practice that there will be no filesystem calls on the vnode being reclaimed until the reclaim has finished and the vnode has been reused. @param vp The vnode to reclaim. @param ctx Context to authenticate for reclaim. @return 0 for success, or an error code. A nonzero return value results in a panic.
size 24, align 8
struct vnodeop_desc *a_desc
vnode_ta_vp
vfs_context_ta_context

structvnop_pathconf_args

@function VNOP_PATHCONF @abstract Query a filesystem for path properties. @param vp The vnode whose filesystem to query. @param name Which property to request: see unistd.h. For example: _PC_CASE_SENSITIVE (is a filesystem case-sensitive?). Only one property can be requested at a time. @param retval Destination for value of property. @param ctx Context to authenticate for pathconf request. @return 0 for success, or an error code.
size 40, align 8
struct vnodeop_desc *a_desc
vnode_ta_vp
inta_name
int32_t *a_retval
vfs_context_ta_context

structvnop_advlock_args

@function VNOP_ADVLOCK @abstract Aquire or release and advisory lock on a vnode. @discussion Advisory locking is somewhat complicated. VNOP_ADVLOCK is overloaded for both flock() and POSIX advisory locking usage, though not all filesystems support both (or any). VFS provides an advisory locking mechanism for filesystems which can take advantage of it; vfs_setlocklocal() marks a filesystem as using VFS advisory locking support. @param vp The vnode to lock or unlock. @param id Identifier for lock holder: ignored by most filesystems. @param op Which locking operation: F_SETLK: set locking information about a region. F_GETLK: get locking information about the specified region. F_UNLCK: Unlock a region. @param fl Description of file region to lock. l_whence is as with "lseek." Includes a type: F_RDLCK (shared lock), F_UNLCK (unlock) , and F_WRLCK (exclusive lock). @param flags F_FLOCK: use flock() semantics. F_POSIX: use POSIX semantics. F_WAIT: sleep if necessary. F_PROV: Non-coelesced provisional lock (unused in xnu). @param ctx Context to authenticate for advisory locking request. @param timeout Timespec for timeout in case of F_SETLKWTIMEOUT. @return 0 for success, or an error code.
size 64, align 8
struct vnodeop_desc *a_desc
vnode_ta_vp
caddr_ta_id
inta_op
struct flock *a_fl
inta_flags
vfs_context_ta_context
struct timespec *a_timeout

structvnop_allocate_args

@function VNOP_ALLOCATE @abstract Pre-allocate space for a file. @discussion VNOP_ALLOCATE() changes the amount of backing store set aside to a file. It can be used to either shrink or grow a file. If the file shrinks, its ubc size will be modified accordingly, but if it grows, then the ubc size is unchanged; space is set aside without being actively used by the file. VNOP_ALLOCATE() is currently only called as part of the F_PREALLOCATE fcntl. @param vp The vnode for which to preallocate space. @param length Desired preallocated file length. @param flags PREALLOCATE: preallocate allocation blocks. ALLOCATECONTIG: allocate contigious space. ALLOCATEALL: allocate all requested space or no space at all. ALLOCATEPERSIST: do not deallocate allocated but unfilled blocks at close(2). ALLOCATEFROMPEOF: allocate from the physical eof. ALLOCATEFROMVOL: allocate from the volume offset. @param bytesallocated Additional bytes set aside for file. Set to 0 if none are allocated OR if the file is contracted. @param offset Hint for where to find free blocks. @param ctx Context to authenticate for allocation request. @return 0 for success, or an error code.
size 56, align 8
struct vnodeop_desc *a_desc
vnode_ta_vp
off_ta_length
u_int32_ta_flags
off_t *a_bytesallocated
off_ta_offset
vfs_context_ta_context

structvnop_pagein_args

@function VNOP_PAGEIN @abstract Pull file data into memory. @discussion VNOP_PAGEIN() is called by when a process faults on data mapped from a file or when madvise() demands pre-fetching. It is conceptually somewhat similar to VNOP_READ(). Filesystems are typically expected to call cluster_pagein() to handle the labor of mapping and committing the UPL. @param vp The vnode for which to page in data. @param pl UPL describing pages needing to be paged in. @param pl_offset Offset in UPL at which to start placing data. @param f_offset Offset in file of data needing to be paged in. @param size Amount of data to page in (in bytes). @param flags UPL-style flags: UPL_IOSYNC, UPL_NOCOMMIT, UPL_NORDAHEAD, UPL_VNODE_PAGER, UPL_MSYNC. Filesystems should generally leave it to the cluster layer to handle these flags. See the memory_object_types.h header in the kernel framework if interested. @param ctx Context to authenticate for pagein request. @return 0 for success, or an error code.
size 64, align 8
struct vnodeop_desc *a_desc
vnode_ta_vp
upl_ta_pl
upl_offset_ta_pl_offset
off_ta_f_offset
size_ta_size
inta_flags
vfs_context_ta_context

structvnop_pageout_args

@function VNOP_PAGEOUT @abstract Write data from a mapped file back to disk. @discussion VNOP_PAGEOUT() is called when data from a mapped file needs to be flushed to disk, either because of an msync() call or due to memory pressure. Filesystems are for the most part expected to just call cluster_pageout(). However, if they opt into the VFC_VFSVNOP_PAGEOUTV2 flag, then they will be responsible for creating their own UPLs. @param vp The vnode for which to page out data. @param pl UPL describing pages needed to be paged out. If UPL is NULL, then it means the filesystem has opted into VFC_VFSVNOP_PAGEOUTV2 semantics, which means that it will create and operate on its own UPLs as opposed to relying on the one passed down into the filesystem. This means that the filesystem must be responsible for N cluster_pageout calls for N dirty ranges in the UPL. @param pl_offset Offset in UPL from which to start paging out data. Under the new VFC_VFSVNOP_PAGEOUTV2 semantics, this is the offset in the range specified that must be paged out if the associated page is dirty. @param f_offset Offset in file of data needing to be paged out. Under the new VFC_VFSVNOP_PAGEOUTV2 semantics, this represents the offset in the file where we should start looking for dirty pages. @param size Amount of data to page out (in bytes). Under VFC_VFSVNOP_PAGEOUTV2, this represents the size of the range to be considered. The fileystem is free to extend or shrink the specified range to better fit its blocking model as long as the page at 'pl_offset' is included. @param flags UPL-style flags: UPL_IOSYNC, UPL_NOCOMMIT, UPL_NORDAHEAD, UPL_VNODE_PAGER, UPL_MSYNC. Filesystems should generally leave it to the cluster layer to handle these flags. See the memory_object_types.h header in the kernel framework if interested. @param ctx Context to authenticate for pageout request. @return 0 for success, or an error code.
size 64, align 8
struct vnodeop_desc *a_desc
vnode_ta_vp
upl_ta_pl
upl_offset_ta_pl_offset
off_ta_f_offset
size_ta_size
inta_flags
vfs_context_ta_context

structvnop_searchfs_args

@function VNOP_SEARCHFS @abstract Search a filesystem quickly for files or directories that match the passed-in search criteria. @discussion VNOP_SEARCHFS is a getattrlist-based system call which is implemented almost entirely inside supported filesystems. Callers provide a set of criteria to match against, and the filesystem is responsible for finding all files or directories that match the criteria. Once these files or directories are found, the user-requested attributes of these files is provided as output. The set of searchable attributes is a subset of the getattrlist attributes. For example, ATTR_CMN_UUID is not a valid searchable attribute as of 10.6. A common usage scenario could be to request all files whose mod dates is greater than time X, less than time Y, and provide the inode ID and filename of the matching objects as output. @param vp The vnode representing the mountpoint of the filesystem to be searched. @param a_searchparams1 If one-argument search criteria is requested, the search criteria would go here. However, some search criteria, like ATTR_CMN_MODTIME, can be bounded. The user could request files modified between time X and time Y. In this case, the lower bound goes in a_searchparams1. @param a_searchparams2 If two-argument search criteria is requested, the upper bound goes in here. @param a_searchattrs Contains the getattrlist-style attribute bits which are requested by the current search. @param a_maxmatches The maximum number of matches to return in a single system call. @param a_timelimit The suggested maximum amount of time we can spend in the kernel to service this system call. Filesystems should use this as a guide only, and set their own internal maximum time to avoid denial of service. @param a_returnattrs The getattrlist-style attributes to return for items in the filesystem that match the search criteria above. @param a_scriptcode Currently ignored. @param a_uio The uio in which to write out the search matches. @param a_searchstate Sometimes searches cannot be completed in a single system call. In this case, we provide an identifier back to the user which indicates where to resume a previously-started search. This is an opaque structure used by the filesystem to identify where to resume said search. @param a_context The context in which to perform the filesystem search. @return 0 on success, EAGAIN for searches which could not be completed in 1 call, and other ERRNOS as needed.
size 104, align 8
struct vnodeop_desc *a_desc
vnode_ta_vp
void *a_searchparams1
void *a_searchparams2
struct attrlist *a_searchattrs
uint32_ta_maxmatches
struct timeval *a_timelimit
struct attrlist *a_returnattrs
uint32_t *a_nummatches
uint32_ta_scriptcode
uint32_ta_options
struct uio *a_uio
struct searchstate *a_searchstate
vfs_context_ta_context

structvnop_copyfile_args

@function VNOP_COPYFILE @abstract Copy a file from one location to another. @discussion VNOP_COPYFILE() copies a file, including its data and metadata, from one location to another. This operation is used to implement efficient file copying that can take advantage of filesystem-specific optimizations such as copy-on-write or server-side copying. @param a_fvp The source file vnode to copy from. @param a_tdvp The destination directory vnode where the copy will be created. @param a_tvp The destination file vnode (may be NULL if creating a new file). @param a_tcnp Component name information for the destination file. @param a_mode File creation mode for the destination file. @param a_flags Copy operation flags. @param a_context Context to authenticate for copy operation. @return 0 for success, or an error code.
size 56, align 8
struct vnodeop_desc *a_desc
vnode_ta_fvp
vnode_ta_tdvp
vnode_ta_tvp
struct componentname *a_tcnp
inta_mode
inta_flags
vfs_context_ta_context

enumdir_clone_authorizer_op

underlying type unsigned int
OP_AUTHORIZE0request authorization of action
OP_VATTR_SETUP1query for attributes that are required for OP_AUTHORIZE
OP_VATTR_CLEANUP2request to cleanup any state or free any memory allocated in OP_AUTHORIZE

typedefdir_clone_authorizer_op_t

typedef enum dir_clone_authorizer_op dir_clone_authorizer_op_t;

structvnop_clonefile_args

@function VNOP_CLONEFILE @abstract Call down to a filesystem to clone a filesystem object (regular file, directory or symbolic link.) @discussion If file creation succeeds, "vpp" should be returned with an iocount to be dropped by the caller. @param dvp Directory in which to clone object. @param vpp Destination for vnode for newly cloned object. @param cnp Description of name of object to clone. @param vap File creation properties, as seen in vnode_getattr(). Manipulated with VATTR_ISACTIVE, VATTR_RETURN, VATTR_SET_SUPPORTED, and so forth. All attributes not set here should either be copied from the source object or set to values which are used for creating new filesystem objects @param ctx Context against which to authenticate file creation. @return 0 for success or a filesystem-specific error.
size 80, align 8
struct vnodeop_desc *a_desc
vnode_ta_fvp
vnode_ta_dvp
vnode_t *a_vpp
struct componentname *a_cnp
struct vnode_attr *a_vap
uint32_ta_flags
vfs_context_ta_context
int (*)(struct vnode_attr *, kauth_action_t, struct vnode_attr *, vnode_t, mount_t, dir_clone_authorizer_op_t, uint32_t, vfs_context_t, void *)a_dir_clone_authorizerAlways NULL
void *a_reservedCurrently unused

structvnop_getxattr_args

size 56, align 8
struct vnodeop_desc *a_desc
vnode_ta_vp
const char *a_name
uio_ta_uio
size_t *a_size
inta_options
vfs_context_ta_context

variablevnop_getxattr_desc

extern struct vnodeop_desc vnop_getxattr_desc

functionVNOP_GETXATTR

extern errno_t VNOP_GETXATTR(
	vnode_t vp,
	const char *name,
	uio_t uio,
	size_t *size,
	int options,
	vfs_context_t ctx
)
@function VNOP_GETXATTR @abstract Get extended file attributes. @param vp The vnode to get extended attributes for. @param name Which property to extract. @param uio Destination information for attribute value. @param size Should be set to the amount of data written. @param options XATTR_NOSECURITY: bypass security-checking. @param ctx Context to authenticate for getxattr request. @return 0 for success, or an error code.

structvnop_setxattr_args

size 48, align 8
struct vnodeop_desc *a_desc
vnode_ta_vp
const char *a_name
uio_ta_uio
inta_options
vfs_context_ta_context

variablevnop_setxattr_desc

extern struct vnodeop_desc vnop_setxattr_desc

functionVNOP_SETXATTR

extern errno_t VNOP_SETXATTR(
	vnode_t vp,
	const char *name,
	uio_t uio,
	int options,
	vfs_context_t ctx
)
@function VNOP_SETXATTR @abstract Set extended file attributes. @param vp The vnode to set extended attributes for. @param name Which property to extract. @param uio Source information for attribute value. @param options XATTR_NOSECURITY: bypass security-checking. XATTR_CREATE: set value, fail if exists. XATTR_REPLACE: set value, fail if does not exist. @param ctx Context to authenticate for setxattr request. @return 0 for success, or an error code.

structvnop_removexattr_args

size 40, align 8
struct vnodeop_desc *a_desc
vnode_ta_vp
const char *a_name
inta_options
vfs_context_ta_context

variablevnop_removexattr_desc

extern struct vnodeop_desc vnop_removexattr_desc

structvnop_listxattr_args

size 48, align 8
struct vnodeop_desc *a_desc
vnode_ta_vp
uio_ta_uio
size_t *a_size
inta_options
vfs_context_ta_context

variablevnop_listxattr_desc

extern struct vnodeop_desc vnop_listxattr_desc

structvnop_blktooff_args

@function VNOP_BLKTOOFF @abstract Call down to a filesystem to convert a logical block number to a file offset. @discussion VNOP_BLKTOOFF() converts a logical block to a file offset in bytes. That offset can be passed to VNOP_BLOCKMAP(), then, to get a physical block number--buf_strategy() does this. @param vp The vnode for which to convert a logical block to an offset. @param lblkno Logical block number to turn into offset. @param offset Destination for file offset. @return 0 for success, else an error code.
size 32, align 8
struct vnodeop_desc *a_desc
vnode_ta_vp
daddr64_ta_lblkno
off_t *a_offset

structvnop_offtoblk_args

@function VNOP_OFFTOBLK @abstract Call down to a filesystem to convert a file offset to a logical block number. @param vp The vnode for which to convert an offset to a logical block number. @param offset File offset to convert. @param lblkno Destination for corresponding logical block number. @return 0 for success, else an error code.
size 32, align 8
struct vnodeop_desc *a_desc
vnode_ta_vp
off_ta_offset
daddr64_t *a_lblkno

structvnop_blockmap_args

size 72, align 8
struct vnodeop_desc *a_desc
vnode_ta_vp
off_ta_foffset
size_ta_size
daddr64_t *a_bpn
size_t *a_run
void *a_poff
inta_flags
vfs_context_ta_context

structvnop_strategy_args

@function VNOP_STRATEGY @abstract Initiate I/O on a file (both read and write). @discussion A filesystem strategy routine takes a buffer, performs whatever manipulations are necessary for passing the I/O request down to the device layer, and calls the appropriate device's strategy routine. Most filesystems should just call buf_strategy() with "bp" as the argument. @param bp Complete specificiation of requested I/O: region of data involved, whether request is for read or write, and so on. @return 0 for success, else an error code.
size 16, align 8
struct vnodeop_desc *a_desc
struct buf *a_bp

functionVNOP_STRATEGY

extern errno_t VNOP_STRATEGY(struct buf *bp)
claude-fable-5, 2026-08-23 · not from Apple sources · verified against xnu bsd/sys/vnode_if.h, bsd/vfs/kpi_vfs.c
Initiates I/O on a file, for both reads and writes, by invoking the filesystem's strategy routine for the buffer. The strategy routine performs whatever manipulation is needed to pass the request to the device layer and calls the device's own strategy routine; most filesystems just call buf_strategy() with bp. The buffer completely specifies the requested I/O. Returns 0 for success, else an error code.

structvnop_bwrite_args

@function VNOP_BWRITE @abstract Write a buffer to backing store. @discussion VNOP_BWRITE() is called by buf_bawrite() (asynchronous write) and potentially by buf_bdwrite() (delayed write) but not by buf_bwrite(). A filesystem may choose to perform some kind of manipulation of the buffer in this routine; it generally will end up calling VFS's default implementation, vn_bwrite() (which calls buf_bwrite() without further ado). @param bp The buffer to write. @return 0 for success, else an error code.
size 16, align 8
struct vnodeop_desc *a_desc
buf_ta_bp

functionVNOP_BWRITE

extern errno_t VNOP_BWRITE(buf_t bp)
claude-fable-5, 2026-08-23 · not from Apple sources · verified against xnu bsd/sys/vnode_if.h, bsd/vfs/kpi_vfs.c
Writes a buffer to backing store through the filesystem's bwrite entry point. Called by buf_bawrite() and potentially by buf_bdwrite(), but not by buf_bwrite(). A filesystem may manipulate the buffer here, generally ending by calling the VFS default implementation vn_bwrite(), which calls buf_bwrite(). Returns 0 for success, else an error code.

structvnop_kqfilt_add_args

@function VNOP_KQFILT_ADD @abstract Add a kernel queue filter to a vnode. @discussion VNOP_KQFILT_ADD() is called to add a kernel queue filter (kqueue) to a vnode. This allows processes to monitor the vnode for specific events. @param a_vp The vnode to add the filter to. @param a_kn The kernel note (knote) structure describing the filter. @param a_context Context to authenticate for the operation. @return 0 for success, or an error code.
size 32, align 8
struct vnodeop_desc *a_desc
struct vnode *a_vp
struct knote *a_kn
vfs_context_ta_context

variablevnop_kqfilt_add_desc

extern struct vnodeop_desc vnop_kqfilt_add_desc

structvnop_kqfilt_remove_args

@function VNOP_KQFILT_REMOVE @abstract Remove a kernel queue filter from a vnode. @discussion VNOP_KQFILT_REMOVE() is called to remove a kernel queue filter from a vnode. @param a_vp The vnode to remove the filter from. @param a_ident Identifier for the filter to remove. @param a_context Context to authenticate for the operation. @return 0 for success, or an error code.
size 32, align 8
struct vnodeop_desc *a_desc
struct vnode *a_vp
uintptr_ta_ident
vfs_context_ta_context

variablevnop_kqfilt_remove_desc

extern struct vnodeop_desc vnop_kqfilt_remove_desc

macroVNODE_MONITOR_BEGIN

#define VNODE_MONITOR_BEGIN 0x01

macroVNODE_MONITOR_END

#define VNODE_MONITOR_END 0x02

macroVNODE_MONITOR_UPDATE

#define VNODE_MONITOR_UPDATE 0x04

structvnop_monitor_args

@function VNOP_MONITOR @abstract Indicate to a filesystem that the number of watchers of a file has changed. @param vp The vnode whose watch state has changed. @param events Unused. Filesystems can ignore this parameter. @param flags Type of change to the watch state. VNODE_MONITOR_BEGIN is passed when the kernel begins tracking a new watcher of a file. VNODE_MONITOR_END is passed when a watcher stops watching a file. VNODE_MONITOR_UPDATE is currently unused. A filesystem is guaranteed that each VNODE_MONITOR_BEGIN will be matched by a VNODE_MONITOR_END with the same "handle" argument. @param handle Unique identifier for a given watcher. A VNODE_MONITOR_BEGIN for a given handle will be matched with a VNODE_MONITOR_END for the same handle; a filesystem need not consider this parameter unless it for some reason wants be able to match specific VNOP_MONITOR calls rather than just keeping a count. @param ctx The context which is starting to monitor a file or ending a watch on a file. A matching pair of VNODE_MONITOR_BEGIN and VNODE_MONITOR_END need not have the same context. @discussion VNOP_MONITOR() is intended to let networked filesystems know when they should bother listening for changes to files which occur remotely, so that they can post notifications using vnode_notify(). Local filesystems should not implement a monitor vnop. It is called when there is a new watcher for a file or when a watcher for a file goes away. Each BEGIN will be matched with an END with the same handle. Note that vnode_ismonitored() can be used to see if there are currently watchers for a file.
size 40, align 8
struct vnodeop_desc *a_desc
vnode_ta_vp
uint32_ta_events
uint32_ta_flags
void *a_handle
vfs_context_ta_context

structvnop_setlabel_args

@function VNOP_SETLABEL @abstract Associate a MACF label with a file. @param vp The vnode to label. @param label The desired label. @param ctx Context to authenticate for label change. @return 0 for success, else an error code.
size 32, align 8
struct vnodeop_desc *a_desc
struct vnode *a_vp
struct label *a_vl
vfs_context_ta_context

variablevnop_setlabel_desc

extern struct vnodeop_desc vnop_setlabel_desc

enumvnode_verify_flags_t

underlying type uint32_t
VNODE_VERIFY_DEFAULT0
VNODE_VERIFY_CONTEXT_ALLOC1
VNODE_VERIFY_WITH_CONTEXT2
VNODE_VERIFY_CONTEXT_FREE4
VNODE_VERIFY_PRECOMPUTED8

typedefvnode_verify_flags_t

typedef enum vnode_verify_flags_t vnode_verify_flags_t;

macroVNODE_VERIFY_DEFAULT

#define VNODE_VERIFY_DEFAULT VNODE_VERIFY_DEFAULT

macroVNODE_VERIFY_WITH_CONTEXT

#define VNODE_VERIFY_WITH_CONTEXT VNODE_VERIFY_WITH_CONTEXT

macroVNODE_VERIFY_PRECOMPUTED

#define VNODE_VERIFY_PRECOMPUTED VNODE_VERIFY_PRECOMPUTED

structvnop_verify_args

@function VNOP_VERIFY @abstract Call down to a filesystem to verify file data for integrity. @discussion VNOP_VERIFY() returns whether file data being read has been verified to be what was written. This does not impose a specific mechanism for ensuring integrity beyond requiring that this be done in multiples of a verify block size (analogous to a filesystem block size but it can be per file) @param vp The vnode for which data is to be verified. @param foffset Offset (in bytes) at which region to be verified starts. @param buf buffer containing file data at foffset. If this is NULL, then only the verification block size is being requested. When VNODE_VERIFY_PRECOMPUTED is set, this buffer is for the precomputed verification data. @param bufsize size of data buffer to be verified. For VNODE_VERIFY_CONTEXT_ALLOC, this specifies the length of the region of the file beginning at f_offset that needs verification and the context should be allocated for (f_offset, f_offset + bufsize) @param verifyblksize pointer to size of verification block size in use for this file. If the verification block size is 0, no verification will be performed. The verification block size can be any value which is a power of two upto 128KiB. @param verify_ctxp context for verification to allocated by the FS and used in verification. @param flags modifier flags. if no flags are set (VNODE_VERIFY_DEFAULT), one or both of a_buf and a_verifyblksize is passed. Verification is only required if a_buf is passed. In each of the flag values, a_verifyblocksize must be returned if it is set For all flag values, the operation to be performed is specified by the value of the flag and the corresponding arguments that the operation requires will be set. VNODE_VERIFY_CONTEXT_ALLOC : f_offset, bufsize and verify_ctxp. VNODE_VERIFY_WITH_CONTEXT : f_offset, buf, bufsize, verify_ctxp VNODE_VERIFY_PRECOMPUTED : f_offset, buf, bufsize VNODE_VERIFY_CONTEXT_FREE verify_ctxp @param ctx Context to authenticate for verify request; currently often set to NULL. @param verifykind Additional information on kind of data to be verified. for example if a specific type of hash function is required. Only types defined for vnode_verify_kind_t are supported. @return 0 for success, else an error code. For VNODE_VERIFY_PRECOMPUTED, an error return of EAGAIN indicates that the Filesystem would like to fallback to VNODE_VERIFY_WITH_CONTEXT.
size 80, align 8
struct vnodeop_desc *a_desc
vnode_ta_vp
off_ta_foffset
uint8_t *a_buf
size_ta_bufsize
size_t *a_verifyblksize
void **a_verify_ctxp
vnode_verify_flags_ta_flags
vfs_context_ta_context
vnode_verify_kind_t *a_verifykindvnode_verify_kind_t defined in sys/buf.h