GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
VNODE_PAGER_SETSIZE(9) FreeBSD Kernel Developer's Manual VNODE_PAGER_SETSIZE(9)

vnode_pager_setsize
notify the VM system about updates in the file size

#include <sys/param.h>
#include <vm/vm.h>
#include <vm/vm_extern.h>

void
vnode_pager_setsize(struct vnode *vp, vm_ooffset_t nsize);

vnode_pager_setsize lets the VM system know about a change in size for a file, and updates the object size and vnode pager size of the vm object in vp with nsize. Page faults on the object mapping with offset beyond the new object size results in SIGBUS.

Pages between the old EOF and the new EOF are removed from the object queue if the file size shrinks. In case the new EOF specified by the nsize argument is not aligned to page boundary, partial-page area starting beyond the EOF is zeroed and marked invalid. if the page exists resident.

In case the vnode vp does not have a VM object allocated, the effect of calling this function is no-op.

This function must be used within file system code to implement truncation if the file system allocates vm objects for vnodes.

The vnode should be exclusively locked on entry and will still be locked on exit.

vnode(9)

The vnode_pager_setsize manual page first appeared in FreeBSD 14.

This manual page was written by Ka Ho Ng <khng@FreeBSD.org>.
April 8, 2021 FreeBSD 13.1-RELEASE

Search for    or go to Top of page |  Section 9 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.