UVN_ATTACH(9)

NAME
uvn_attach, uvm_vnp_setsize, uvm_vnp_sync, uvm_vnp_terminate, uvm_vnp_uncache - memory mapping files and devices

SYNOPSIS
#include <sys/param.h>
#include <uvm/uvm.h>
struct uvm_object *
uvn_attach(struct vnode *vp, vm_prot_t accessprot);
void
uvm_vnp_setsize(struct vnode *vp, voff_t newsize);
void
uvm_vnp_sync(struct mount *mp);
void
uvm_vnp_terminate(struct vnode *vp);
boolean_t
uvm_vnp_uncache(struct vnode *vp);

DESCRIPTION
The uvn_attach() function attaches a UVM object to vnode vp, creating the object if necessary. The object is returned.

The uvm_vnp_setsize() function sets the size of vnode vp to newsize. Caller must hold a reference to the vnode. If the vnode shrinks, pages no longer used are discarded. This function will be removed when the file system and VM buffer caches are merged.

The uvm_vnp_sync() function flushes dirty vnodes from either the mount point passed in mp, or all dirty vnodes if mp is NULL. This function will be removed when the file system and VM buffer caches are merged.

The uvm_vnp_terminate() function frees all VM resources allocated to vnode vp. If the vnode still has references, it will not be destroyed; however all future operations using this vnode will fail. This function will be removed when the file system and VM buffer caches are merged.

The uvm_vnp_uncache() function disables vnode vp from persisting when all references are freed. This function will be removed when the file system and UVM caches are unified. Returns true if there is no active vnode.

SEE ALSO
uvm_init(9)