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