Print this page
re #13613 rb4516 Tunables needs volatile keyword

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/fsflush.c
          +++ new/usr/src/uts/common/fs/fsflush.c
↓ open down ↓ 13 lines elided ↑ open up ↑
  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  /*      Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
  22   22  /*        All Rights Reserved   */
  23   23  
  24      -
  25   24  /*
  26   25   * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  27   26   * Use is subject to license terms.
  28   27   */
       28 +/*
       29 + * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
       30 + */
  29   31  
  30   32  #include <sys/types.h>
  31   33  #include <sys/t_lock.h>
  32   34  #include <sys/param.h>
  33   35  #include <sys/tuneable.h>
  34   36  #include <sys/inline.h>
  35   37  #include <sys/systm.h>
  36   38  #include <sys/proc.h>
  37   39  #include <sys/user.h>
  38   40  #include <sys/var.h>
↓ open down ↓ 11 lines elided ↑ open up ↑
  50   52  #include <sys/reboot.h>
  51   53  #include <sys/time.h>
  52   54  #include <sys/fs/ufs_inode.h>
  53   55  #include <sys/fs/ufs_bio.h>
  54   56  
  55   57  #include <vm/hat.h>
  56   58  #include <vm/page.h>
  57   59  #include <vm/pvn.h>
  58   60  #include <vm/seg_kmem.h>
  59   61  
  60      -int doiflush = 1;       /* non-zero to turn inode flushing on */
  61      -int dopageflush = 1;    /* non-zero to turn page flushing on */
       62 +volatile int doiflush = 1;      /* non-zero to turn inode flushing on */
       63 +volatile int dopageflush = 1;   /* non-zero to turn page flushing on */
  62   64  
  63   65  /*
  64   66   * To improve boot performance, don't run the inode flushing loop until
  65   67   * the specified number of seconds after boot.  To revert to the old
  66   68   * behavior, set fsflush_iflush_delay to 0.  We have not created any new
  67   69   * filesystem danger that did not exist previously, since there is always a
  68   70   * window in between when fsflush does the inode flush loop during which the
  69   71   * system could crash, fail to sync the filesystem, and fsck will be needed
  70   72   * to recover.  We have, however, widened this window.  Finally,
  71   73   * we never delay inode flushing if we're booting into single user mode,
↓ open down ↓ 419 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX