Print this page
re #13613 rb4516 Tunables needs volatile keyword

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/tmpfs/tmp_vfsops.c
          +++ new/usr/src/uts/common/fs/tmpfs/tmp_vfsops.c
↓ open down ↓ 12 lines elided ↑ open up ↑
  13   13   * When distributing Covered Code, include this CDDL HEADER in each
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
  22   22   * Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved.
       23 + * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
  23   24   * Copyright 2015 Joyent, Inc.
  24   25   */
  25   26  
  26   27  #include <sys/types.h>
  27   28  #include <sys/param.h>
  28   29  #include <sys/sysmacros.h>
  29   30  #include <sys/kmem.h>
  30   31  #include <sys/time.h>
  31   32  #include <sys/pathname.h>
  32   33  #include <sys/vfs.h>
↓ open down ↓ 117 lines elided ↑ open up ↑
 150  151   * physical memory which is determined when tmpfs is first used in the system.
 151  152   *
 152  153   * tmpfs_minfree is the minimum amount of swap space that tmpfs leaves for
 153  154   * the rest of the system.  In other words, if the amount of free swap space
 154  155   * in the system (i.e. anoninfo.ani_free) drops below tmpfs_minfree, tmpfs
 155  156   * anon allocations will fail.
 156  157   *
 157  158   * There is also a per mount limit on the amount of swap space
 158  159   * (tmount.tm_anonmax) settable via a mount option.
 159  160   */
 160      -size_t tmpfs_maxkmem = 0;
 161      -size_t tmpfs_minfree = 0;
      161 +volatile size_t tmpfs_maxkmem = 0;
      162 +volatile size_t tmpfs_minfree = 0;
 162  163  size_t tmp_kmemspace;           /* bytes of kernel heap used by all tmpfs */
 163  164  
 164  165  static major_t tmpfs_major;
 165  166  static minor_t tmpfs_minor;
 166  167  static kmutex_t tmpfs_minor_lock;
 167  168  
 168  169  /*
 169  170   * initialize global tmpfs locks and such
 170  171   * called when loading tmpfs module
 171  172   */
↓ open down ↓ 542 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX