NAME
vnode_pager_purge_range – invalidate the cached content within the given byte range
SYNOPSIS
#include <sys/param.h>
#include <vm/vm.h>
#include <vm/vm_extern.h>
void
vnode_pager_purge_range(struct vnode *vp, vm_ooffset_t start, vm_ooffset_t end);
DESCRIPTION
vnode_pager_purge_range invalidates the cached content within the given byte range from the specified vnode vp. The range to be purged is [ start, end,). If the end parameter is the value zero, the affected range starts from start continues to the end of the object. Pages within the specified range will be removed from the object's queue. If start or end is not aligned to a page boundary, the invalidated part of the page is zeroed. This function only cleans the resident pages in the affected region, it is up to the callers to ensure reading the backing store gets back zeroes.
In case the vnode vp does not have a VM object allocated, the effect of calling this function is a no-op.
LOCKS
The vnode must be locked on entry and will still be locked on exit.
SEE ALSO
HISTORY
The vnode_pager_purge_range manual page first appeared in FreeBSD 14.
AUTHORS
This manual page was written by Ka Ho Ng ⟨[email protected]⟩.