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:01 +1000
committerBen Myers <bpm@sgi.com>2013-08-12 17:49:02 -0500
commite773fc934fcbe2536dc625c2bd76234b9b9a60b6 (patch)
tree25faa59058c2c6168bc3b61392c0a356b8c3b798 /fs/xfs/xfs_log_format.h
parentf749278c5a45e8a80f3e3ca41d4634b84948b9d9 (diff)
downloadlinux-e773fc934fcbe2536dc625c2bd76234b9b9a60b6.tar.gz
linux-e773fc934fcbe2536dc625c2bd76234b9b9a60b6.tar.bz2
linux-e773fc934fcbe2536dc625c2bd76234b9b9a60b6.zip
xfs: Refactor xfs_ticket_alloc() to extract a new helper
Refactor xlog_ticket_alloc() to extract a new helper, i.e. xfs_log_calc_unit_res(). This helper would be used to calculate the total log reservation size by adding extra log operation/transation headers for a new log ticket. 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.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/xfs/xfs_log_format.h b/fs/xfs/xfs_log_format.h
index 198381eca1f8..cc08f597593c 100644
--- a/fs/xfs/xfs_log_format.h
+++ b/fs/xfs/xfs_log_format.h
@@ -18,6 +18,8 @@
#ifndef __XFS_LOG_FORMAT_H__
#define __XFS_LOG_FORMAT_H__
+struct xfs_mount;
+
/*
* On-disk Log Format definitions.
*
@@ -834,4 +836,6 @@ struct xfs_icreate_log {
__be32 icl_gen; /* inode generation number to use */
};
+int xfs_log_calc_unit_res(struct xfs_mount *mp, int unit_bytes);
+
#endif /* __XFS_LOG_FORMAT_H__ */