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 (c) 1984, 1986, 1987, 1988, 1989 AT&T     */
  28 /*        All Rights Reserved   */
  29 
  30 
  31 #ifndef _SYS_FS_SWAPNODE_H
  32 #define _SYS_FS_SWAPNODE_H
  33 
  34 #ifdef  __cplusplus
  35 extern "C" {
  36 #endif
  37 
  38 /*
  39  * pointer to swapfs global data structures
  40  */
  41 extern pgcnt_t swapfs_minfree;          /* amount of availrmem (in pages) */
  42                                         /* that is unavailable to swapfs */
  43 extern pgcnt_t swapfs_desfree;
  44 
  45 extern pgcnt_t swapfs_reserve;          /* amount of availrmem (in pages) */
  46                                         /* that is unavailable for swap */
  47                                         /* reservation to non-priv processes */
  48 
  49 extern struct vnodeops *swap_vnodeops;
  50 extern struct vnode *swapfs_getvp(ulong_t);
  51 
  52 #ifdef SWAPFS_DEBUG
  53 extern int swapfs_debug;
  54 #define SWAPFS_PRINT(X, S, Y1, Y2, Y3, Y4, Y5)  \
  55         if (swapfs_debug & (X))             \
  56                 printf(S, Y1, Y2, Y3, Y4, Y5);
  57 #define SWAP_SUBR       0x01
  58 #define SWAP_VOPS       0x02
  59 #define SWAP_VFSOPS     0x04
  60 #define SWAP_PGC                0x08
  61 #define SWAP_PUTP       0x10
  62 #else   /* SWAPFS_DEBUG */
  63 #define SWAPFS_PRINT(X, S, Y1, Y2, Y3, Y4, Y5)
  64 #endif  /* SWAPFS_DEBUG */
  65 
 | 
 
 
   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 
 |