xref: /freebsd/sys/vm/vnode_pager.h (revision b068bb09a1a82d9fef0e939ad6135443a959e290)
160727d8bSWarner Losh /*-
251369649SPedro F. Giffuni  * SPDX-License-Identifier: BSD-3-Clause
351369649SPedro F. Giffuni  *
4df8bae1dSRodney W. Grimes  * Copyright (c) 1990 University of Utah.
5df8bae1dSRodney W. Grimes  * Copyright (c) 1991, 1993
6df8bae1dSRodney W. Grimes  *	The Regents of the University of California.  All rights reserved.
7df8bae1dSRodney W. Grimes  *
8df8bae1dSRodney W. Grimes  * This code is derived from software contributed to Berkeley by
9df8bae1dSRodney W. Grimes  * the Systems Programming Group of the University of Utah Computer
10df8bae1dSRodney W. Grimes  * Science Department.
11df8bae1dSRodney W. Grimes  *
12df8bae1dSRodney W. Grimes  * Redistribution and use in source and binary forms, with or without
13df8bae1dSRodney W. Grimes  * modification, are permitted provided that the following conditions
14df8bae1dSRodney W. Grimes  * are met:
15df8bae1dSRodney W. Grimes  * 1. Redistributions of source code must retain the above copyright
16df8bae1dSRodney W. Grimes  *    notice, this list of conditions and the following disclaimer.
17df8bae1dSRodney W. Grimes  * 2. Redistributions in binary form must reproduce the above copyright
18df8bae1dSRodney W. Grimes  *    notice, this list of conditions and the following disclaimer in the
19df8bae1dSRodney W. Grimes  *    documentation and/or other materials provided with the distribution.
20fbbd9655SWarner Losh  * 3. Neither the name of the University nor the names of its contributors
21df8bae1dSRodney W. Grimes  *    may be used to endorse or promote products derived from this software
22df8bae1dSRodney W. Grimes  *    without specific prior written permission.
23df8bae1dSRodney W. Grimes  *
24df8bae1dSRodney W. Grimes  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
25df8bae1dSRodney W. Grimes  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26df8bae1dSRodney W. Grimes  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27df8bae1dSRodney W. Grimes  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
28df8bae1dSRodney W. Grimes  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29df8bae1dSRodney W. Grimes  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30df8bae1dSRodney W. Grimes  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31df8bae1dSRodney W. Grimes  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32df8bae1dSRodney W. Grimes  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33df8bae1dSRodney W. Grimes  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34df8bae1dSRodney W. Grimes  * SUCH DAMAGE.
35df8bae1dSRodney W. Grimes  */
36df8bae1dSRodney W. Grimes 
37df8bae1dSRodney W. Grimes #ifndef	_VNODE_PAGER_
38df8bae1dSRodney W. Grimes #define	_VNODE_PAGER_	1
39df8bae1dSRodney W. Grimes 
40c4473420SPeter Wemm #ifdef _KERNEL
41ce75f2c3SMike Smith 
42*b068bb09SKonstantin Belousov struct vnode;
43*b068bb09SKonstantin Belousov void vnode_pager_clean_sync(struct vnode *vp);
44*b068bb09SKonstantin Belousov void vnode_pager_clean_async(struct vnode *vp);
4511caded3SAlfred Perlstein int vnode_pager_generic_getpages(struct vnode *vp, vm_page_t *m,
46b0cd2017SGleb Smirnoff     int count, int *rbehind, int *rahead, vop_getpages_iodone_t iodone,
47b0cd2017SGleb Smirnoff     void *arg);
4811caded3SAlfred Perlstein int vnode_pager_generic_putpages(struct vnode *vp, vm_page_t *m,
4953b64048SKonstantin Belousov     int count, int flags, int *rtvals);
50d15b55c5SKonstantin Belousov int vnode_pager_local_getpages(struct vop_getpages_args *ap);
5190effb23SGleb Smirnoff int vnode_pager_local_getpages_async(struct vop_getpages_async_args *ap);
5265b9599aSKonstantin Belousov int vnode_pager_putpages_ioflags(int pager_flags);
53555b7bb4SKonstantin Belousov void vnode_pager_undirty_pages(vm_page_t *ma, int *rtvals, int written,
54555b7bb4SKonstantin Belousov     off_t eof, int lpos);
55031ec8c1SKonstantin Belousov 
56a1287949SEivind Eklund #endif				/* _KERNEL */
57df8bae1dSRodney W. Grimes #endif				/* _VNODE_PAGER_ */
58