diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/xfs/xfs_log_priv.h | 4 | ||||
-rw-r--r-- | fs/xfs/xfs_vfsops.c | 8 |
2 files changed, 5 insertions, 7 deletions
diff --git a/fs/xfs/xfs_log_priv.h b/fs/xfs/xfs_log_priv.h index e973972d4633..db0d53ffe458 100644 --- a/fs/xfs/xfs_log_priv.h +++ b/fs/xfs/xfs_log_priv.h | |||
@@ -35,11 +35,11 @@ struct xfs_mount; | |||
35 | #define XLOG_VERSION_1 1 | 35 | #define XLOG_VERSION_1 1 |
36 | #define XLOG_VERSION_2 2 /* Large IClogs, Log sunit */ | 36 | #define XLOG_VERSION_2 2 /* Large IClogs, Log sunit */ |
37 | #define XLOG_VERSION_OKBITS (XLOG_VERSION_1 | XLOG_VERSION_2) | 37 | #define XLOG_VERSION_OKBITS (XLOG_VERSION_1 | XLOG_VERSION_2) |
38 | #define XLOG_RECORD_BSIZE (16*1024) /* eventually 32k */ | 38 | #define XLOG_MIN_RECORD_BSIZE (16*1024) /* eventually 32k */ |
39 | #define XLOG_BIG_RECORD_BSIZE (32*1024) /* 32k buffers */ | 39 | #define XLOG_BIG_RECORD_BSIZE (32*1024) /* 32k buffers */ |
40 | #define XLOG_MAX_RECORD_BSIZE (256*1024) | 40 | #define XLOG_MAX_RECORD_BSIZE (256*1024) |
41 | #define XLOG_HEADER_CYCLE_SIZE (32*1024) /* cycle data in header */ | 41 | #define XLOG_HEADER_CYCLE_SIZE (32*1024) /* cycle data in header */ |
42 | #define XLOG_RECORD_BSHIFT 14 /* 16384 == 1 << 14 */ | 42 | #define XLOG_MIN_RECORD_BSHIFT 14 /* 16384 == 1 << 14 */ |
43 | #define XLOG_BIG_RECORD_BSHIFT 15 /* 32k == 1 << 15 */ | 43 | #define XLOG_BIG_RECORD_BSHIFT 15 /* 32k == 1 << 15 */ |
44 | #define XLOG_MAX_RECORD_BSHIFT 18 /* 256k == 1 << 18 */ | 44 | #define XLOG_MAX_RECORD_BSHIFT 18 /* 256k == 1 << 18 */ |
45 | #define XLOG_BTOLSUNIT(log, b) (((b)+(log)->l_mp->m_sb.sb_logsunit-1) / \ | 45 | #define XLOG_BTOLSUNIT(log, b) (((b)+(log)->l_mp->m_sb.sb_logsunit-1) / \ |
diff --git a/fs/xfs/xfs_vfsops.c b/fs/xfs/xfs_vfsops.c index 11f5ea29a038..47c890778bb6 100644 --- a/fs/xfs/xfs_vfsops.c +++ b/fs/xfs/xfs_vfsops.c | |||
@@ -238,11 +238,9 @@ xfs_start_flags( | |||
238 | mp->m_logbufs = ap->logbufs; | 238 | mp->m_logbufs = ap->logbufs; |
239 | if (ap->logbufsize != -1 && | 239 | if (ap->logbufsize != -1 && |
240 | ap->logbufsize != 0 && | 240 | ap->logbufsize != 0 && |
241 | ap->logbufsize != 16 * 1024 && | 241 | (ap->logbufsize < XLOG_MIN_RECORD_BSIZE || |
242 | ap->logbufsize != 32 * 1024 && | 242 | ap->logbufsize > XLOG_MAX_RECORD_BSIZE || |
243 | ap->logbufsize != 64 * 1024 && | 243 | !is_power_of_2(ap->logbufsize))) { |
244 | ap->logbufsize != 128 * 1024 && | ||
245 | ap->logbufsize != 256 * 1024) { | ||
246 | cmn_err(CE_WARN, | 244 | cmn_err(CE_WARN, |
247 | "XFS: invalid logbufsize: %d [not 16k,32k,64k,128k or 256k]", | 245 | "XFS: invalid logbufsize: %d [not 16k,32k,64k,128k or 256k]", |
248 | ap->logbufsize); | 246 | ap->logbufsize); |