Print this page
re #13613 rb4516 Tunables needs volatile keyword
@@ -20,10 +20,13 @@
*/
/*
* Copyright 2010 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
+/*
+ * Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+ */
/*
* Copyright (c) 1983,1984,1985,1986,1987,1988,1989 AT&T.
* All rights reserved.
*/
@@ -1662,11 +1665,11 @@
crfree(ncrfree);
return (error);
}
-static int nfs3_do_symlink_cache = 1;
+volatile int nfs3_do_symlink_cache = 1;
/* ARGSUSED */
static int
nfs3_readlink(vnode_t *vp, struct uio *uiop, cred_t *cr, caller_context_t *ct)
{
@@ -1991,11 +1994,11 @@
VN_RELE(avp);
return (error);
}
-static int nfs3_lookup_neg_cache = 1;
+volatile int nfs3_lookup_neg_cache = 1;
#ifdef DEBUG
static int nfs3_lookup_dnlc_hits = 0;
static int nfs3_lookup_dnlc_misses = 0;
static int nfs3_lookup_dnlc_neg_hits = 0;
@@ -3697,11 +3700,11 @@
static int nfs3_readdir_cache_waits = 0;
static int nfs3_readdir_cache_misses = 0;
static int nfs3_readdir_readahead = 0;
#endif
-static int nfs3_shrinkreaddir = 0;
+volatile int nfs3_shrinkreaddir = 0;
/*
* Read directory entries.
* There are some weird things to look out for here. The uio_loffset
* field is either 0 or it is the offset returned from a previous
@@ -4516,11 +4519,11 @@
}
/*
* number of nfs3_bsize blocks to read ahead.
*/
-static int nfs3_nra = 4;
+volatile int nfs3_nra = 4;
#ifdef DEBUG
static int nfs3_lostpage = 0; /* number of times we lost original page */
#endif
@@ -5704,11 +5707,11 @@
dmapp->caller->error = error;
(void) as_delete_callback(as, arg);
kmem_free(dmapp, sizeof (nfs_delmap_args_t));
}
-static int nfs3_pathconf_disable_cache = 0;
+volatile int nfs3_pathconf_disable_cache = 0;
#ifdef DEBUG
static int nfs3_pathconf_cache_hits = 0;
static int nfs3_pathconf_cache_misses = 0;
#endif