Print this page
re #13613 rb4516 Tunables needs volatile keyword


   3  *
   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.

  23  */
  24 
  25 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
  26 /*      All Rights Reserved   */
  27 
  28 /*
  29  * Portions of this source code were derived from Berkeley 4.3 BSD
  30  * under license from the Regents of the University of California.
  31  */
  32 
  33 #ifndef _NFS4_CLNT_H
  34 #define _NFS4_CLNT_H
  35 
  36 #include <sys/errno.h>
  37 #include <sys/types.h>
  38 #include <sys/kstat.h>
  39 #include <sys/time.h>
  40 #include <sys/flock.h>
  41 #include <vm/page.h>
  42 #include <nfs/nfs4_kprot.h>


1565 
1566 extern void     mi_hold(mntinfo4_t *);
1567 extern void     mi_rele(mntinfo4_t *);
1568 
1569 extern vnode_t  *find_referral_stubvp(vnode_t *, char *, cred_t *);
1570 extern int       nfs4_setup_referral(vnode_t *, char *, vnode_t **, cred_t *);
1571 
1572 extern sec_data_t       *copy_sec_data(sec_data_t *);
1573 extern gss_clntdata_t   *copy_sec_data_gss(gss_clntdata_t *);
1574 
1575 #ifdef DEBUG
1576 extern int      nfs4_consistent_type(vnode_t *);
1577 #endif
1578 
1579 extern void     nfs4_init_dot_entries(void);
1580 extern void     nfs4_destroy_dot_entries(void);
1581 extern struct nfs4_callback_globals     *nfs4_get_callback_globals(void);
1582 
1583 extern struct nfs4_server nfs4_server_lst;
1584 
1585 extern clock_t nfs_write_error_interval;
1586 
1587 #endif /* _KERNEL */
1588 
1589 /*
1590  * Flags for nfs4getfh_otw.
1591  */
1592 
1593 #define NFS4_GETFH_PUBLIC       0x01
1594 #define NFS4_GETFH_NEEDSOP      0x02
1595 
1596 /*
1597  * Found through rnodes.
1598  *
1599  * The os_open_ref_count keeps track the number of open file descriptor
1600  * references on this data structure.  It will be bumped for any successful
1601  * OTW OPEN call and any OPEN call that determines the OTW call is not
1602  * necessary and the open stream hasn't just been created (see
1603  * nfs4_is_otw_open_necessary).
1604  *
1605  * os_mapcnt is a count of the number of mmapped pages for a particular




   3  *
   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
  23  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
  24  */
  25 
  26 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
  27 /*      All Rights Reserved   */
  28 
  29 /*
  30  * Portions of this source code were derived from Berkeley 4.3 BSD
  31  * under license from the Regents of the University of California.
  32  */
  33 
  34 #ifndef _NFS4_CLNT_H
  35 #define _NFS4_CLNT_H
  36 
  37 #include <sys/errno.h>
  38 #include <sys/types.h>
  39 #include <sys/kstat.h>
  40 #include <sys/time.h>
  41 #include <sys/flock.h>
  42 #include <vm/page.h>
  43 #include <nfs/nfs4_kprot.h>


1566 
1567 extern void     mi_hold(mntinfo4_t *);
1568 extern void     mi_rele(mntinfo4_t *);
1569 
1570 extern vnode_t  *find_referral_stubvp(vnode_t *, char *, cred_t *);
1571 extern int       nfs4_setup_referral(vnode_t *, char *, vnode_t **, cred_t *);
1572 
1573 extern sec_data_t       *copy_sec_data(sec_data_t *);
1574 extern gss_clntdata_t   *copy_sec_data_gss(gss_clntdata_t *);
1575 
1576 #ifdef DEBUG
1577 extern int      nfs4_consistent_type(vnode_t *);
1578 #endif
1579 
1580 extern void     nfs4_init_dot_entries(void);
1581 extern void     nfs4_destroy_dot_entries(void);
1582 extern struct nfs4_callback_globals     *nfs4_get_callback_globals(void);
1583 
1584 extern struct nfs4_server nfs4_server_lst;
1585 
1586 extern volatile clock_t nfs_write_error_interval;
1587 
1588 #endif /* _KERNEL */
1589 
1590 /*
1591  * Flags for nfs4getfh_otw.
1592  */
1593 
1594 #define NFS4_GETFH_PUBLIC       0x01
1595 #define NFS4_GETFH_NEEDSOP      0x02
1596 
1597 /*
1598  * Found through rnodes.
1599  *
1600  * The os_open_ref_count keeps track the number of open file descriptor
1601  * references on this data structure.  It will be bumped for any successful
1602  * OTW OPEN call and any OPEN call that determines the OTW call is not
1603  * necessary and the open stream hasn't just been created (see
1604  * nfs4_is_otw_open_necessary).
1605  *
1606  * os_mapcnt is a count of the number of mmapped pages for a particular