Print this page
re #13613 rb4516 Tunables needs volatile keyword

@@ -19,10 +19,11 @@
  * CDDL HEADER END
  */
 /*
  * Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2011 Bayard G. Bell. All rights reserved.
+ * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
  * Copyright 2013 Joyent, Inc. All rights reserved.
  */
 
 /*
  *      Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T

@@ -283,11 +284,11 @@
  * Returns the preferred transfer size in bytes based on
  * what network interfaces are available.
  */
 
 /* this should reflect the largest transfer size possible */
-static int nfs3_max_transfer_size = 1024 * 1024;
+volatile int nfs3_max_transfer_size = 1024 * 1024;
 
 int
 nfs3tsize(void)
 {
         /*

@@ -295,13 +296,13 @@
          * can query the appropriate transport.
          */
         return (nfs3_max_transfer_size);
 }
 
-static uint_t nfs3_max_transfer_size_clts = 32 * 1024;
-static uint_t nfs3_max_transfer_size_cots = 1024 * 1024;
-static uint_t nfs3_max_transfer_size_rdma = 1024 * 1024;
+volatile uint_t nfs3_max_transfer_size_clts = 32 * 1024;
+volatile uint_t nfs3_max_transfer_size_cots = 1024 * 1024;
+volatile uint_t nfs3_max_transfer_size_rdma = 1024 * 1024;
 
 uint_t
 nfs3_tsize(struct knetconfig *knp)
 {