1.\" 2.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD 3.\" 4.\" Copyright (c) 2021 The FreeBSD Foundation 5.\" 6.\" This manual page was written by Ka Ho Ng under sponsorship from 7.\" the FreeBSD Foundation. 8.\" 9.\" Redistribution and use in source and binary forms, with or without 10.\" modification, are permitted provided that the following conditions 11.\" are met: 12.\" 1. Redistributions of source code must retain the above copyright 13.\" notice, this list of conditions and the following disclaimer. 14.\" 2. Redistributions in binary form must reproduce the above copyright 15.\" notice, this list of conditions and the following disclaimer in the 16.\" documentation and/or other materials provided with the distribution. 17.\" 18.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 19.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 22.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28.\" SUCH DAMAGE. 29.\" 30.Dd April 24, 2022 31.Dt VNODE_PAGER_PURGE_RANGE 9 32.Os 33.Sh NAME 34.Nm vnode_pager_purge_range 35.Nd "invalidate the cached content within the given byte range" 36.Sh SYNOPSIS 37.In sys/param.h 38.In vm/vm.h 39.In vm/vm_extern.h 40.Ft void 41.Fo vnode_pager_purge_range 42.Fa "struct vnode *vp" 43.Fa "vm_ooffset_t start" 44.Fa "vm_ooffset_t end" 45.Fc 46.Sh DESCRIPTION 47.Nm 48invalidates the cached content within the given byte range from the 49specified vnode 50.Fa vp . 51The range to be purged is 52.Eo [ 53.Fa start , end 54.Ec ) . 55If the 56.Fa end 57parameter is the value zero, the affected range starts from 58.Fa start 59continues to the end of the object. 60Pages within the specified range will be removed from the object's queue. 61If 62.Fa start 63or 64.Fa end 65is not aligned to a page boundary, the invalidated part of the page is zeroed. 66This function only cleans the resident pages in the affected region, it is up to 67the callers to ensure reading the backing store gets back zeroes. 68.Pp 69In case the vnode 70.Fa vp 71does not have a VM object allocated, the effect of calling this function is a 72no-op. 73.Sh LOCKS 74The vnode must be locked on entry and will still be locked on exit. 75.Sh SEE ALSO 76.Xr vnode 9 77.Sh HISTORY 78The 79.Nm 80manual page first appeared in 81.Fx 14 . 82.Sh AUTHORS 83This 84manual page was written by 85.An Ka Ho Ng Aq Mt khng@FreeBSD.org . 86