aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/xfs/xfs_log.c33
-rw-r--r--fs/xfs/xfs_log_priv.h1
2 files changed, 7 insertions, 27 deletions
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c
index db09e1ea5cf3..4f4d20b2721c 100644
--- a/fs/xfs/xfs_log.c
+++ b/fs/xfs/xfs_log.c
@@ -1025,10 +1025,7 @@ xlog_bdstrat_cb(struct xfs_buf *bp)
1025/* 1025/*
1026 * Return size of each in-core log record buffer. 1026 * Return size of each in-core log record buffer.
1027 * 1027 *
1028 * Low memory machines only get 2 16KB buffers. We don't want to waste 1028 * All machines get 8 x 32KB buffers by default, unless tuned otherwise.
1029 * memory here. However, all other machines get at least 2 32KB buffers.
1030 * The number is hard coded because we don't care about the minimum
1031 * memory size, just 32MB systems.
1032 * 1029 *
1033 * If the filesystem blocksize is too large, we may need to choose a 1030 * If the filesystem blocksize is too large, we may need to choose a
1034 * larger size since the directory code currently logs entire blocks. 1031 * larger size since the directory code currently logs entire blocks.
@@ -1041,17 +1038,10 @@ xlog_get_iclog_buffer_size(xfs_mount_t *mp,
1041 int size; 1038 int size;
1042 int xhdrs; 1039 int xhdrs;
1043 1040
1044 if (mp->m_logbufs <= 0) { 1041 if (mp->m_logbufs <= 0)
1045 if (xfs_physmem <= btoc(128*1024*1024)) { 1042 log->l_iclog_bufs = XLOG_MAX_ICLOGS;
1046 log->l_iclog_bufs = XLOG_MIN_ICLOGS; 1043 else
1047 } else if (xfs_physmem <= btoc(400*1024*1024)) {
1048 log->l_iclog_bufs = XLOG_MED_ICLOGS;
1049 } else { /* 256K with 32K bufs */
1050 log->l_iclog_bufs = XLOG_MAX_ICLOGS;
1051 }
1052 } else {
1053 log->l_iclog_bufs = mp->m_logbufs; 1044 log->l_iclog_bufs = mp->m_logbufs;
1054 }
1055 1045
1056 /* 1046 /*
1057 * Buffer size passed in from mount system call. 1047 * Buffer size passed in from mount system call.
@@ -1082,18 +1072,9 @@ xlog_get_iclog_buffer_size(xfs_mount_t *mp,
1082 goto done; 1072 goto done;
1083 } 1073 }
1084 1074
1085 /* 1075 /* All machines use 32KB buffers by default. */
1086 * Special case machines that have less than 32MB of memory. 1076 log->l_iclog_size = XLOG_BIG_RECORD_BSIZE;
1087 * All machines with more memory use 32KB buffers. 1077 log->l_iclog_size_log = XLOG_BIG_RECORD_BSHIFT;
1088 */
1089 if (xfs_physmem <= btoc(32*1024*1024)) {
1090 /* Don't change; min configuration */
1091 log->l_iclog_size = XLOG_RECORD_BSIZE; /* 16k */
1092 log->l_iclog_size_log = XLOG_RECORD_BSHIFT;
1093 } else {
1094 log->l_iclog_size = XLOG_BIG_RECORD_BSIZE; /* 32k */
1095 log->l_iclog_size_log = XLOG_BIG_RECORD_BSHIFT;
1096 }
1097 1078
1098 /* the default log size is 16k or 32k which is one header sector */ 1079 /* the default log size is 16k or 32k which is one header sector */
1099 log->l_iclog_hsize = BBSIZE; 1080 log->l_iclog_hsize = BBSIZE;
diff --git a/fs/xfs/xfs_log_priv.h b/fs/xfs/xfs_log_priv.h
index 9bd3cdf11a87..e973972d4633 100644
--- a/fs/xfs/xfs_log_priv.h
+++ b/fs/xfs/xfs_log_priv.h
@@ -30,7 +30,6 @@ struct xfs_mount;
30 */ 30 */
31 31
32#define XLOG_MIN_ICLOGS 2 32#define XLOG_MIN_ICLOGS 2
33#define XLOG_MED_ICLOGS 4
34#define XLOG_MAX_ICLOGS 8 33#define XLOG_MAX_ICLOGS 8
35#define XLOG_HEADER_MAGIC_NUM 0xFEEDbabe /* Invalid cycle number */ 34#define XLOG_HEADER_MAGIC_NUM 0xFEEDbabe /* Invalid cycle number */
36#define XLOG_VERSION_1 1 35#define XLOG_VERSION_1 1