Diff for /xfs-linux/xfs_log.c between versions 1.333 and 1.334

version 1.333, 2007/08/02 15:56:48 version 1.334, 2007/08/02 16:08:38
Line 1025  xlog_bdstrat_cb(struct xfs_buf *bp) Line 1025  xlog_bdstrat_cb(struct xfs_buf *bp)
 /*  /*
  * Return size of each in-core log record buffer.   * Return size of each in-core log record buffer.
  *   *
  * Low memory machines only get 2 16KB buffers.  We don't want to waste   * All machines get 8 x 32KB buffers by default, unless tuned otherwise.
  * memory here.  However, all other machines get at least 2 32KB buffers.  
  * The number is hard coded because we don't care about the minimum  
  * memory size, just 32MB systems.  
  *   *
  * If the filesystem blocksize is too large, we may need to choose a   * If the filesystem blocksize is too large, we may need to choose a
  * larger size since the directory code currently logs entire blocks.   * larger size since the directory code currently logs entire blocks.
Line 1041  xlog_get_iclog_buffer_size(xfs_mount_t * Line 1038  xlog_get_iclog_buffer_size(xfs_mount_t *
         int size;          int size;
         int xhdrs;          int xhdrs;
   
         if (mp->m_logbufs <= 0) {          if (mp->m_logbufs <= 0)
                 if (xfs_physmem <= btoc(128*1024*1024)) {                  log->l_iclog_bufs = XLOG_MAX_ICLOGS;
                         log->l_iclog_bufs = XLOG_MIN_ICLOGS;          else
                 } else if (xfs_physmem <= btoc(400*1024*1024)) {  
                         log->l_iclog_bufs = XLOG_MED_ICLOGS;  
                 } else {        /* 256K with 32K bufs */  
                         log->l_iclog_bufs = XLOG_MAX_ICLOGS;  
                 }  
         } else {  
                 log->l_iclog_bufs = mp->m_logbufs;                  log->l_iclog_bufs = mp->m_logbufs;
         }  
   
         /*          /*
          * Buffer size passed in from mount system call.           * Buffer size passed in from mount system call.
Line 1082  xlog_get_iclog_buffer_size(xfs_mount_t * Line 1072  xlog_get_iclog_buffer_size(xfs_mount_t *
                 goto done;                  goto done;
         }          }
   
         /*          /* All machines use 32KB buffers by default. */
          * Special case machines that have less than 32MB of memory.          log->l_iclog_size = XLOG_BIG_RECORD_BSIZE;
          * All machines with more memory use 32KB buffers.          log->l_iclog_size_log = XLOG_BIG_RECORD_BSHIFT;
          */  
         if (xfs_physmem <= btoc(32*1024*1024)) {  
                 /* Don't change; min configuration */  
                 log->l_iclog_size = XLOG_RECORD_BSIZE;          /* 16k */  
                 log->l_iclog_size_log = XLOG_RECORD_BSHIFT;  
         } else {  
                 log->l_iclog_size = XLOG_BIG_RECORD_BSIZE;      /* 32k */  
                 log->l_iclog_size_log = XLOG_BIG_RECORD_BSHIFT;  
         }  
   
         /* the default log size is 16k or 32k which is one header sector */          /* the default log size is 16k or 32k which is one header sector */
         log->l_iclog_hsize = BBSIZE;          log->l_iclog_hsize = BBSIZE;

Removed from v.1.333  
changed lines
  Added in v.1.334


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>