Print this page
re #13613 rb4516 Tunables needs volatile keyword

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/sys/fs/tmp.h
          +++ new/usr/src/uts/common/sys/fs/tmp.h
↓ open down ↓ 15 lines elided ↑ open up ↑
  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 2007 Sun Microsystems, Inc.
  23   23   * All rights reserved.  Use is subject to license terms.
  24   24   */
  25   25  /*
       26 + * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
  26   27   * Copyright 2015 Joyent, Inc.
  27   28   */
  28   29  
  29   30  #ifndef _SYS_FS_TMP_H
  30   31  #define _SYS_FS_TMP_H
  31   32  
  32   33  #ifdef  __cplusplus
  33   34  extern "C" {
  34   35  #endif
  35   36  
↓ open down ↓ 36 lines elided ↑ open up ↑
  72   73   * leaves free for the rest of the system.  E.g. in a system with 32MB of
  73   74   * configured swap space, if 16MB were reserved (leaving 16MB free),
  74   75   * tmpfs could allocate up to 16MB - tmpfs_minfree.  The default value
  75   76   * for tmpfs_minfree is btopr(TMPMINFREE) but it can cautiously patched
  76   77   * to a different number of pages.
  77   78   * NB: If tmpfs allocates too much swap space, other processes will be
  78   79   * unable to execute.
  79   80   */
  80   81  #define TMPMINFREE      2 * 1024 * 1024 /* 2 Megabytes */
  81   82  
  82      -extern size_t   tmpfs_minfree;          /* Anonymous memory in pages */
       83 +extern volatile size_t  tmpfs_minfree;  /* Anonymous memory in pages */
  83   84  
  84   85  /*
  85   86   * tmpfs can allocate only a certain percentage of kernel memory,
  86   87   * which is used for tmpnodes, directories, file names, etc.
  87   88   * This is statically set as TMPMAXFRACKMEM of physical memory.
  88   89   * The actual number of allocatable bytes can be patched in tmpfs_maxkmem.
  89   90   */
  90   91  #define TMPMAXFRACKMEM  25      /* 1/25 of physical memory */
  91   92  
  92   93  extern size_t   tmp_kmemspace;
  93      -extern size_t   tmpfs_maxkmem;  /* Allocatable kernel memory in bytes */
       94 +extern volatile size_t  tmpfs_maxkmem;  /* Allocatable kernel memory in bytes */
  94   95  
  95   96  extern  void    tmpnode_init(struct tmount *, struct tmpnode *,
  96   97          struct vattr *, struct cred *);
  97   98  extern  int     tmpnode_trunc(struct tmount *, struct tmpnode *, ulong_t);
  98   99  extern  void    tmpnode_growmap(struct tmpnode *, ulong_t);
  99  100  extern  int     tdirlookup(struct tmpnode *, char *, struct tmpnode **,
 100  101      struct cred *);
 101  102  extern  int     tdirdelete(struct tmpnode *, struct tmpnode *, char *,
 102  103          enum dr_op, struct cred *);
 103  104  extern  void    tdirinit(struct tmpnode *, struct tmpnode *);
↓ open down ↓ 20 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX