summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_log_format.h
diff options
context:
space:
mode:
authorJie Liu <jeff.liu@oracle.com>2013-08-12 20:50:02 +1000
committerBen Myers <bpm@sgi.com>2013-08-12 17:49:38 -0500
commit5a96a94547fe345467c2ab2ec51cb3fade355bd9 (patch)
tree938de207a0021f622782fd28a6c1c39fbe3a5d5f /fs/xfs/xfs_log_format.h
parente773fc934fcbe2536dc625c2bd76234b9b9a60b6 (diff)
xfs: Add xfs_log_rlimit.c
Add source files for xfs_log_rlimit.c The new file is used for log size calculations and validation shared with userspace. [dchinner: xfs_log_calc_max_attrsetm_res() does not modify the tr_attrsetm reservation, just calculates the maximum. ] [dchinner: rework loop in xfs_log_get_max_trans_res() ] Signed-off-by: Jie Liu <jeff.liu@oracle.com> Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Mark Tinguely <tinguely@sgi.com> Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_log_format.h')
-rw-r--r--fs/xfs/xfs_log_format.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/xfs/xfs_log_format.h b/fs/xfs/xfs_log_format.h
index cc08f597593..a49ab2c1e7a 100644
--- a/fs/xfs/xfs_log_format.h
+++ b/fs/xfs/xfs_log_format.h
@@ -19,6 +19,7 @@
#define __XFS_LOG_FORMAT_H__
struct xfs_mount;
+struct xfs_trans_res;
/*
* On-disk Log Format definitions.
@@ -51,6 +52,9 @@ typedef __uint32_t xlog_tid_t;
#define XLOG_HEADER_SIZE 512
+/* Minimum number of transactions that must fit in the log (defined by mkfs) */
+#define XFS_MIN_LOG_FACTOR 3
+
#define XLOG_REC_SHIFT(log) \
BTOBB(1 << (xfs_sb_version_haslogv2(&log->l_mp->m_sb) ? \
XLOG_MAX_RECORD_BSHIFT : XLOG_BIG_RECORD_BSHIFT))
@@ -135,7 +139,6 @@ typedef struct xlog_op_header {
__u16 oh_res2; /* 32 bit align : 2 b */
} xlog_op_header_t;
-
/* valid values for h_fmt */
#define XLOG_FMT_UNKNOWN 0
#define XLOG_FMT_LINUX_LE 1
@@ -837,5 +840,7 @@ struct xfs_icreate_log {
};
int xfs_log_calc_unit_res(struct xfs_mount *mp, int unit_bytes);
+int xfs_log_calc_minimum_size(struct xfs_mount *);
+
#endif /* __XFS_LOG_FORMAT_H__ */