1 /*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
7 * with the License.
8 *
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
13 *
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 *
20 * CDDL HEADER END
21 */
22 /*
23 * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
25 */
26 /*
27 * Copyright 2013 Nexenta Systems, Inc. All rights reserved.
28 */
29
30 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
31 /* All Rights Reserved */
32
33
34 #ifndef _SYS_FS_SWAPNODE_H
35 #define _SYS_FS_SWAPNODE_H
36
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40
41 /*
42 * pointer to swapfs global data structures
43 */
44 extern volatile pgcnt_t swapfs_minfree; /* amount of availrmem (in pages) */
45 /* that is unavailable to swapfs */
46 extern pgcnt_t swapfs_desfree;
47
48 extern volatile pgcnt_t swapfs_reserve; /* amount of availrmem (in pages) */
49 /* that is unavailable for swap */
50 /* reservation to non-priv processes */
51
52 extern struct vnodeops *swap_vnodeops;
53 extern struct vnode *swapfs_getvp(ulong_t);
54
55 #ifdef SWAPFS_DEBUG
56 extern int swapfs_debug;
57 #define SWAPFS_PRINT(X, S, Y1, Y2, Y3, Y4, Y5) \
58 if (swapfs_debug & (X)) \
59 printf(S, Y1, Y2, Y3, Y4, Y5);
60 #define SWAP_SUBR 0x01
61 #define SWAP_VOPS 0x02
62 #define SWAP_VFSOPS 0x04
63 #define SWAP_PGC 0x08
64 #define SWAP_PUTP 0x10
65 #else /* SWAPFS_DEBUG */
66 #define SWAPFS_PRINT(X, S, Y1, Y2, Y3, Y4, Y5)
67 #endif /* SWAPFS_DEBUG */
68
69 #ifdef __cplusplus
70 }
71 #endif
72
73 #endif /* _SYS_FS_SWAPNODE_H */